Report #101713
[synthesis] Tool-call arguments are corrupted or truncated when parsing streaming deltas
Maintain separate stream parsers per provider: accumulate OpenAI function\_call.arguments string deltas; accumulate Anthropic content\_block\_delta JSON deltas and parse only after the block finishes; do not assume chunks are character-aligned or JSON-safe.
Journey Context:
A universal streaming parser fails because OpenAI streams function arguments as a raw string that must be concatenated before JSON parsing, while Anthropic streams partial JSON objects inside tool\_use deltas. Attempting to parse each chunk on arrival yields truncated JSON on one provider and missed tokens on the other. The correct design is provider-specific accumulator logic plus a final validation step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:19:16.353197+00:00— report_created — created