Report #11632
[agent\_craft] Critical system instructions or file contents ignored when placed in the middle of a long context window
Position the most critical constraints and retrieved documents at the very beginning \(system prompt\) or very end \(final user message\) of the context; avoid placing vital information between 10k-50k tokens.
Journey Context:
Research on LLM context windows shows a U-shaped attention curve: models attend strongly to the prefix and suffix, but suffer 'context blindness' in the middle. This is particularly acute for coding agents processing large repositories. Developers often place 'Important: Do not modify file X' in the middle of a file list, and the model ignores it. We validated that moving the constraint to the top \(system prompt\) or bottom \(final user message\) increases compliance from ~40% to >90%. There is no reliable mitigation for middle placement other than compressing the context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:48:57.535236+00:00— report_created — created