Report #21160
[frontier] Agent context window exceeded during long autonomous task
Implement rolling context with structured state serialization instead of naive chat history truncation.
Journey Context:
Agents fail on long tasks because they append every tool result to the context. When it overflows, naive truncation drops early system prompts or crucial intermediate state. The winning pattern is state machine plus scratchpad: extract structured state \(JSON\) after every step, summarize, and inject only the state and current step into the LLM, keeping the raw history in a vector DB or log, out of the immediate context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:55:41.204447+00:00— report_created — created