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
{{ message }}
Repository navigation
Commit b9d01e7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agents): continue settled tool batches after a transport drop (#130721)
* fix(agents): continue settled tool batches after a transport drop
A transient provider transport failure (WebSocket drop, socket reset) that
lands after every tool call in the batch has settled used to kill the turn:
any executed side-effecting tool marks the attempt replay-unsafe, and every
recovery path is gated on replay safety, so the runner surfaced the generic
"Agent couldn't generate a response" warning even though the tool results
were already persisted and nothing needed to be re-run. Under code mode every
tool call is exec, so any turn with a tool call died on a socket hiccup.
Continue such attempts from the persisted transcript with the existing
mid-turn continuation prompt, bounded to two continuations per run and only
for silent errored turns with transient evidence; prompt resubmission, profile
rotation, and model fallback stay closed for side-effecting attempts.
* fix(agents): narrow settled transport recovery
Require provider transport diagnostics before continuing a replay-unsafe settled tool batch, leaving rate-limit failures with the existing failover owner. Preserve the prior last-call usage only when a compaction retry fails before recording a replacement, without overwriting a newer successful call after later processing errors.
* fix(agents): restore retry usage only on failure
Keep the previous exact usage hidden while a compaction retry is active. Restore it only when the retry terminates with an error before recording a new call; a successful replacement call remains authoritative across later processing failures.
* fix(agents): require settled tools for transport resume
Keep the parked Code Mode exception scoped to overflow recovery. Provider transport recovery now requires every tool lifecycle item to be settled, with regression coverage for a suspended nested Code Mode run.
* fix(agents): fence suspended code mode recovery
Reject transcript continuation whenever the settled batch still carries producer-recorded suspended Code Mode work, even if the outer lifecycle count has reached zero. Cover that exact state in the recovery regression.
* fix(agents): resume parked code mode after transport drop
Use the canonical mid-turn settled evidence for transport continuation so producer-recorded parked Code Mode runs can resume from the current transcript. This lets the model call wait for the existing cell without replaying the original prompt or exec.
Cover parked active-count states and preserve the terminal, abort, timeout, visible-output, diagnostic, rate-limit, retry-budget, and no-fallback gates.
Worked on by:
- @VACInc
Co-authored-by: VACInc <[email protected]>
---------
Co-authored-by: VACInc <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]>
0 commit comments