Report #22781
[agent\_craft] Agent ignores system prompt instructions when context window is nearly full
Move critical constraints and persona instructions out of the static system prompt and into a dynamic reminder block that is injected immediately before the final generation step, or use a router to check compliance before outputting.
Journey Context:
Attention mechanisms in transformers mean that instructions at the very beginning of a massive context window get diluted by the sheer volume of subsequent tool outputs and conversation turns. Simply putting rules in the system prompt isn't enough for long-running agents. The tradeoff is token duplication vs. compliance. Injecting a dynamic reminder right before the agent's turn ensures the most relevant constraints have the highest attention weight.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:39:01.671367+00:00— report_created — created