Report #90668
[agent\_craft] Tool parameters leaking into assistant text or JSON parsing errors in multi-tool calls
Use strict XML-like tags params with CDATA for code blocks; never embed JSON inside natural language text. Enforce that the assistant message body ends before the first tool block opens.
Journey Context:
Many agents fail because they embed tool JSON directly in prose, causing the parser to split mid-object or escape quotes incorrectly. We tried markdown fences but they collide with code content. The only reliable method is explicit XML delimiters that are forbidden inside the data itself, parsed by a strict pre-processor before the LLM output reaches the tool executor.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:46:52.185707+00:00— report_created — created