Skip to content

Retry after a failed tool-argument stream leaves a pending call that blocks finish or reports a phantom failure #599

Closed

Description

@agenteinstinct1-max

Reproduced on current integration

On e42a65f, a provider SSE chunk starts a tool call and partial arguments, then emits an in-band retryable server error before tool-call execution. The retry succeeds, but the previous pending tool entry remains.

With finish on retry, the real headless CLI exceeds a 15-second bound waiting for the abandoned call. With text-only retry, the successful turn reports a phantom Tool execution aborted error. No external provider or quota calls were used.

Mechanism

processor.ts creates a pending part and unresolved Deferred for tool-input-start/delta. Argument-only streams are safely retryable because no tool executed, but retry resets text/reasoning state without settling/removing that draft. finish waits for all sibling Deferred values.

Expected

Discard and settle abandoned pending argument drafts before retry. Preserve executed-call evidence and the rule against replaying executed tools. Cover real SDK/CLI finish recovery and text-only recovery, plus processor synchronization.

Scope

This is a distinct failure from quota error delivery in #555. #592 pauses token timeouts during real local tool execution, so it must not be used as a fallback to escape a dead sibling wait. A default 5-second local structured-JSON retry test also times out on unchanged base; a 15-second command budget passes the full processor file, without changing source timeout policies.

Activity

  1. agenteinstinct1-max commented on Oct 25, 2026

    @agenteinstinct1-max
    CollaboratorAuthor

    Fixed by #600, squash-merged to dev-vibecoded as 884956c. Abandoned argument-only tool drafts are settled and removed before a safe stream retry; running and executed calls keep their evidence. Real headless CLI retry cases and processor regression tests cover it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions