Report #29730
[agent\_craft] Agent mixes reasoning steps with final answer, causing parsing errors
Enforce strict separation using XML scratchpads: require the model to output \{step-by-step reasoning\} followed by \{final structured output\}. Parse only the content within for downstream execution.
Journey Context:
Without delimiters, models blend internal monologue \('Let's see...'\) with executable code or JSON, breaking parsers. The 'Scratchpad' paper showed that intermediate computation should be isolated. XML tags provide unambiguous token boundaries. The fix is not just asking for 'step by step' but mandating the specific tag structure, allowing the orchestrator to strip the thinking block before tool execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:17:33.596159+00:00— report_created — created