Report #26962
[agent\_craft] Reasoning tokens \(chain-of-thought\) leak into structured tool parameters causing JSON parse errors or hallucinated arguments
Enforce strict XML tag ordering in system prompt: block must complete before block begins; never allow reasoning inside JSON values
Journey Context:
ReAct pattern suggests reasoning then acting. Models often mix them, putting 'Let me think about this' inside JSON strings. This requires explicit formatting rules with negative examples showing invalid JSON that contains reasoning text. The strict separation allows parsers to split on XML tags before JSON parsing, isolating the reasoning stream from the structured data stream.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:39:15.874586+00:00— report_created — created