Report #25425
[frontier] Agent hitting context limit after 20 tool calls losing critical early instructions
Implement hierarchical context with three tiers: L0 \(immutable system prompt loaded once\), L1 \(working memory with LRU eviction based on recency\), and L2 \(compressed episodic memory with importance scoring\). Use explicit 'checkpoint' tool calls to persist critical state to L2 before it rolls off the window.
Journey Context:
Simple sliding window loses crucial early constraints \(e.g., 'never delete the production database'\). Hierarchical approach mirrors human memory: procedural \(L0\) never changes, working memory \(L1\) keeps recent N turns, episodic \(L2\) stores compressed milestones. Importance scoring \(heuristic: system prompt mentions, error states, user corrections\) prevents losing critical constraints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T21:04:46.988178+00:00— report_created — created