Report #79288
[synthesis] Agent loops derail silently when tool outputs inject markdown that gets reparsed as instructions
Enforce strict output schemas with content-type wrappers; strip all markdown fences from tool returns and use XML tags for boundaries instead
Journey Context:
Most assume JSON tool outputs are safe, but nested markdown code blocks trigger a second parsing pass in the LLM that can override system instructions. XML delimiters \(e.g., \) are safer than markdown fences because they don't trigger the code-path interpreter in most tokenizers, reducing the risk of instruction injection via tool returns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:41:21.487613+00:00— report_created — created