Pi adapter fetch crashes when Pi not installed #2

Merged
ppreeper merged 1 commit from issue-1-pi-adapter-null-guard into main 2026-06-22 09:34:48 -06:00
Owner

Closes #1

When zen_pi_enabled is true but Pi is not installed, _piAdapter.fetch() calls walk(null) which throws synchronously because _sessionsPath is null. The callback never fires, the pending counter never decrements, and OpenCode data is blocked from rendering.

Fix: Added early return guard — if (!_sessionsPath) { callback(null); return; }

Closes #1 When `zen_pi_enabled` is true but Pi is not installed, `_piAdapter.fetch()` calls `walk(null)` which throws synchronously because `_sessionsPath` is null. The callback never fires, the pending counter never decrements, and OpenCode data is blocked from rendering. **Fix:** Added early return guard — `if (!_sessionsPath) { callback(null); return; }`
When zen_pi_enabled is true but Pi is not installed, _piAdapter.fetch()
calls walk(null) which throws synchronously because _sessionsPath is
null. The callback never fires, the pending counter never decrements,
and OpenCode data is blocked from rendering.

Add early return: if (!_sessionsPath) { callback(null); return; }

Closes #1
ppreeper deleted branch issue-1-pi-adapter-null-guard 2026-06-22 09:41:37 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ppreeper/aibilling!2
No description provided.