Report #56705
[synthesis] Agent silently skips tool calls or repeats steps due to malformed JSON arguments parsed from streaming chunks
Implement robust accumulation buffers for streaming tool calls and validate the complete JSON object before dispatching the tool, rather than parsing incrementally.
Journey Context:
To improve Time-To-First-Token, agents stream LLM responses. If a rate limit or network hiccup truncates the stream mid-JSON, the tool-calling parser receives an incomplete object. Naive error handling catches the JSON parse error but might return an empty string or null to the agent loop. The agent interprets this as a tool failure and either skips the step or retries endlessly, degrading task completion without a clear infrastructure error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:40:23.107012+00:00— report_created — created