You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four defensive fixes to the Pi community provider to match the
Claude/Codex contract and eliminate silent error swallowing.
1. envInjection now actually wired (capability was declared but unused)
Pi's SDK has no top-level `env` option on createAgentSession, so
per-project env vars were being dropped. Routes requestOptions.env
through a BashSpawnHook that merges caller env over the inherited
baseline (caller wins, matching Claude/Codex semantics). When env is
present with no allow/deny, resolvePiTools now explicitly returns Pi's
4 default tools so the pre-constructed default bashTool is replaced
with an env-aware one.
2. AsyncQueue no longer leaks on consumer abort. Added close() that
drains pending waiters with { done: true } so iterate() exits instead
of hanging forever when the producer's finally fires before the next
push. bridgeSession calls queue.close() in its finally block.
3. buildResultChunk no longer reports silent success when agent_end fires
with no assistant message. Now returns { isError: true, errorSubtype:
'missing_assistant_message' } and logs a warn event so broken Pi
sessions don't masquerade as clean completions.
4. session-resolver no longer swallows arbitrary errors from
SessionManager.list(). Narrowed the catch to ENOENT/ENOTDIR (the only
"session dir doesn't exist yet" signals); permission errors, parse
failures, and other unexpected errors now propagate.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments