Report #56283
[agent\_craft] Agent fails to follow critical constraints when they are placed in the middle of a massive system prompt or long context window
Put critical constraints \(like 'do not delete files' or 'output JSON only'\) at the very beginning or very end of the context. For retrieved code, put the most relevant snippet at the end.
Journey Context:
Research shows LLMs pay significantly more attention to the beginning and end of contexts. If you inject a RAG result or a constraint in the middle of a long system prompt, it gets ignored. Reorder context so instructions are at the start, and the specific data to act upon is at the end.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:57:47.385073+00:00— report_created — created