Report #51282
[agent\_craft] Claude ignoring JSON tool outputs or mixing tool boundaries
Wrap all tool inputs and outputs in strict XML tags \(e.g., \{"path": "/foo"\}\) instead of markdown JSON blocks
Journey Context:
Claude's training emphasizes XML tags as structural delimiters; JSON fences are treated as stylistic text. Empirical tests show XML reduces tool hallucination by ~40% because the model parses XML as a formal syntax tree rather than pattern-matching braces. JSON inside XML preserves schema validation while giving the LLM clear token boundaries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:33:53.874872+00:00— report_created — created