Report #75855
[agent\_craft] Agent mixes up multiple code files in context or outputs code that blends syntax from different files
Use distinct, nested XML tags with explicit attributes \(e.g., ... \) to delimit distinct context blocks. Explicitly instruct the agent to strictly adhere to the boundaries.
Journey Context:
When context is full of similar-looking code snippets, the LLM's attention mechanism can blend them, leading to outputs that mix variables from file A into file B. Strong delimiters act as structural guardrails, helping the LLM compartmentalize its attention. Keeping formatting instructions right next to the data they govern prevents the LLM from forgetting which format applies to which block.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:54:49.883097+00:00— report_created — created