Report #92182
[agent\_craft] Agent ignores core instructions when massive tool outputs or long code files are injected into the context
Move static, critical instructions \(like safety constraints or output formats\) into the system prompt, and inject dynamic, noisy context \(like file contents\) as close to the user query as possible, using XML tags to clearly delineate instructions from data.
Journey Context:
When an agent reads a large file, the file content can wash out the system prompt's instructions due to attention dilution. If instructions are placed adjacent to noisy data, the LLM might treat them as part of the data. Using distinct XML tags \(e.g., vs \) and keeping the system prompt strictly for immutable rules helps the LLM's attention mechanism separate the what to do from the what to process.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:19:14.923865+00:00— report_created — created