Report #77934
[synthesis] Agent emits valid-looking but semantically broken tool arguments when streaming partial JSON chunks
Enforce strict JSON Schema validation at the chunk aggregation boundary before tool dispatch, rejecting partial object completion attempts; implement a 'commit gate' that requires schema-valid complete objects before execution
Journey Context:
Streaming improves perceived latency but creates race conditions where the model generates opening braces and hallucinates keys based on training priors rather than actual schema. Most implementations validate post-hoc, but by then the agent has already 'committed' to the tool call in its reasoning trace, creating sunk-cost bias. The alternative of non-streaming adds latency but eliminates this failure mode. The correct approach is treating partial JSON as an invalid state requiring regeneration, not an incomplete state awaiting completion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:24:44.346160+00:00— report_created — created