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
Auto-continuation parks forever when an approval tool shares an assistant message with an already-settled tool #2185
What happens: within a single assistant turn the model calls one tool that resolves (toolA, ends output-available) and then, in a later step of the same turn, calls a needsApproval tool (toolB). Both parts serialize into the same assistant message. The user approves toolB. The continuation never fires — the turn stalls indefinitely. Any new user message unblocks it.
Root cause (confirmed): hasIncompleteToolBatch (agents chat) flags the leaf assistant message as an incomplete parallel batch because it holds both a settled tool result and a pending approval-requested part, so AutoContinuationController parks (the 0.9.0 "parks budget-free until the batch completes" behavior).
But the two tools are sequential — two step-start markers in one message, not a parallel fan-out — and at approval time the batch is actually complete (every non-approval part is settled), yet the approval resolution never re-arms the parked continuation.
Likely counterpart to #2171: that report is the over-firing side of this same machinery — _onStreamingTurnFinalized → rearmForBatch() firing a stale continuation after a stop finish. This is the under-firing side: the re-arm that should fire on approval-completion of an otherwise-settled leaf never does. Both live in the finalization/re-arm path and probably want fixing together.
Minimal repro: one turn that (1) calls a tool returning output, then (2) calls a needsApproval tool, so both land in the same assistant message; approve it. Contrast: when the needsApproval tool is the only tool in its message, the gate is false and approval continues immediately.
Expected: approving the last pending part of a leaf whose other parts are all settled should fire the continuation.
Fixed on main by #2352 (449ac27), which adds tests for this exact shape in both Think and AIChatAgent: one assistant message holding a settled tool result plus a later approval-requested tool. Approving now continues the turn. Please reopen if you still see it on the next release.
Activity
fix/2185 approval batch rearm (#2352)
threepointone commentedon Sep 29, 2026
Fixed on main by #2352 (449ac27), which adds tests for this exact shape in both Think and AIChatAgent: one assistant message holding a settled tool result plus a later approval-requested tool. Approving now continues the turn. Please reopen if you still see it on the next release.