Report #100331
[synthesis] Duplicate or hallucinated tool\_call\_id breaks multi-turn assistant message validation
Validate that every tool\_call\_id in the model's response matches an ID from the immediately preceding assistant message. Reject mismatches and retry with a system reminder. This is especially necessary for smaller models like GPT-4o mini.
Journey Context:
OpenAI's chat format requires a strict 1:1 match between assistant tool\_calls and tool role messages. Smaller models hallucinate or reuse tool\_call\_id under pressure, and frameworks like LangChain sometimes drop or rewrite messages silently. Server-side validation catches this before it corrupts conversation state; client-side trust is not enough.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T05:03:02.234820+00:00— report_created — created