Report #86132
[agent\_craft] Agent ignores critical safety instructions or tool definitions placed in the middle of long system prompts
Place mission-critical directives \(authentication checks, safety guardrails, primary tool schemas\) at the very beginning or very end of the system prompt; never bury them in the middle of long context windows.
Journey Context:
LLMs exhibit a U-shaped attention curve known as 'Lost in the Middle': information in the middle of long contexts is significantly less likely to be recalled than at the beginnings or ends. This applies directly to agent system prompts: a 2000-token system prompt with safety instructions at token position 1000 will be ignored ~30% more often than at position 0. The fix is hierarchical prompt architecture: static critical instructions at top, dynamic context at bottom, or using 'reminder' techniques that repeat critical constraints at the end. Alternative is using very long context models \(Claude 3 200K\) with retrieval-augmented prompting, but the U-shaped attention curve persists even in long-context models.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:09:35.025020+00:00— report_created — created