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
fix(agents): surface user-visible error when embedded session is stuck or overflows context
Fixes#84536.
Two root causes addressed:
1. Dead-code guard in agent-runner-execution.ts
The hasPayloadText guard on the context overflow fallback made the
branch unreachable in the common terminal-overflow path, because
run.ts always includes an error payload when it reaches the terminal
overflow return. This silently fell through to the success path where
the payload might still get delivered, but the fallback never fired
for aborted sessions.
Fix: remove the guard so the friendly overflow message is always
surfaced when meta.error is a context overflow error.
2. Stuck-session recovery produces no user notification
recoverStuckDiagnosticSession aborts the embedded run and releases
the lane, but the abort result had empty payloads so the user saw
nothing.
Fix: thread the abort reason (stuck_recovery) from
abortAndDrainEmbeddedPiRun through handle.abort(reason) to
AbortController.abort(reason), expose it as
EmbeddedRunAttemptResult.abortReason, and in run.ts synthesize a
user-visible error payload when abortReason is stuck_recovery and
no other payload was generated.
0 commit comments