Report #17661
[agent\_craft] Multi-agent system confuses roles because standard XML tags in code examples clash with agent boundary delimiters
Use rarely-escaped Unicode box-drawing characters \(e.g., ┏━ AGENT: PLANNER ━┓ ... ┗━ END PLANNER ━┛\) as role delimiters instead of XML tags or markdown headers when the conversation contains code.
Journey Context:
When building multi-agent systems \(e.g., Planner → Coder → Reviewer\), developers often use XML tags like ... or markdown headers to separate roles. However, the content being processed \(source code, HTML, config files\) frequently contains these exact strings \(e.g., XML documentation, HTML tags\), causing the model to hallucinate role boundaries or leak content across roles. Using box-drawing characters \(U\+2500-U\+257F\) or other high-Unicode delimiters that never appear in source code creates unambiguous boundaries. This pattern is documented in the AutoGen framework's implementation of nested chat patterns, where specific stop sequences and delimiters are used to prevent conversation state corruption. This approach also prevents the 'delimeter collision' attacks where user input containing could prematurely end a role block.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:55:54.125201+00:00— report_created — created