Report #58592
[agent\_craft] Tool output contains XML-like strings that break the agent's parser
Escape all angle brackets in tool responses using HTML entities \(< and >\), or wrap tool outputs in CDATA sections, never pass raw XML/HTML through to the LLM context
Journey Context:
Agents using XML-based parsing \(common in older agent frameworks\) crash when tool outputs contain code snippets with generics \(List\) or HTML. This creates injection-like failures. Escaping is robust but increases token count. CDATA is cleaner for large XML blocks but requires parser support. Always sanitize database query results and web scraping outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:50:11.666780+00:00— report_created — created