Skip to content

fix(ui): skip incomplete tool calls during replay - #227

Merged
anbuzin merged 1 commit into
vercel-labs:mainfrom
EfeDurmaz16:fix/skip-incomplete-tool-replay
Nov 20, 2026
Merged

anbuzin merged 1 commit into
vercel-labs:mainfrom
EfeDurmaz16:fix/skip-incomplete-tool-replay

Conversation

@EfeDurmaz16

Copy link
Copy Markdown
Contributor

What

  • Ignore persisted input-streaming tool parts when rebuilding internal message history.
  • Cover static, dynamic, and legacy tool part shapes.

Why

If a request disconnects while tool arguments are still streaming, the frontend can submit that partial UI state on the next request. The inbound adapter currently converts the partial part into a ToolCallPart, so the agent treats it as a replayable trailing tool call and can execute it before the input is complete.

How

Skip only the input-streaming state before creating internal tool calls. Complete input, approval, result, and error states keep their existing behavior.

Verification

  • uv run --frozen pytest -q: 594 passed
  • Ruff format and lint passed
  • mypy passed
  • ty passed

Suggested release label: fix.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@EfeDurmaz16 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@anbuzin
anbuzin force-pushed the fix/skip-incomplete-tool-replay branch from a05e3bd to fa9d6ba Compare November 20, 2026 22:31
@anbuzin anbuzin added the fix Bug fix label Nov 20, 2026
@anbuzin
anbuzin merged commit c5f44d4 into vercel-labs:main Nov 20, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants