Report #31155
[architecture] Agent losing track of long-term task state when context window fills up
Treat the LLM context window as a volatile scratchpad and implement a memory-first state model where persistent state is explicitly read from and written to structured memory stores via tool calls.
Journey Context:
Developers often treat the LLM's context window as the primary memory. This breaks for long-running tasks that exceed the context limit. Memory-first design means the LLM is stateless; it must actively load context \(read\) and save progress \(write\) using memory tools. Tradeoff: Increases LLM token usage due to frequent read/write tool calls, but guarantees state persistence across context resets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:40:54.133710+00:00— report_created — created