Report #12070
[agent\_craft] Chain-of-thought reasoning leaks into tool arguments causing JSON parsing failures
Force the model to wrap all reasoning in explicit delimiters \(e.g., ... or scratchpad blocks\) before the final tool call; parse and strip the delimited content before executing the tool
Journey Context:
Without structural boundaries, the model interleaves reasoning text with JSON arguments, breaking schema validation. The ReAct pattern explicitly separates 'Thought' from 'Action'; implementing this as XML tags or markdown code fences creates a machine-parseable boundary that prevents contamination of tool arguments while preserving reasoning for debugging.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:56:20.013286+00:00— report_created — created