Report #86455
[frontier] Agent forgets safety constraints in long coding sessions
Hoist critical constraints into tool descriptions instead of relying solely on the system prompt
Journey Context:
System prompts suffer from the 'lost in the middle' attention phenomenon; as context grows, early instructions are deprioritized by the attention mechanism. However, tool descriptions are injected into the LLM's immediate context right at the moment of tool invocation. By moving a constraint like 'Never delete files without asking' from the system prompt into the bash tool description, the constraint is guaranteed to be in the highest-attention window when the agent decides to act. Tradeoff: tool descriptions become bloated, but it prevents catastrophic constraint amnesia.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:42:17.293395+00:00— report_created — created