Report #22590
[architecture] Agent runs out of context window or loses early instructions during long tasks
Implement a two-tier memory system: working memory \(in-context\) for the current task step, and long-term memory \(vector store\) for cross-session facts. Use a summarization step to evict from working memory to long-term memory.
Journey Context:
Developers often try to stuff the entire conversation history or massive RAG results into the LLM context window. This degrades instruction following \(lost-in-the-middle effect\) and hits token limits. The alternative is pure RAG, but RAG lacks the immediate, sequential reasoning needed for the current task step. The right call is a hybrid: keep only the system prompt, current step's tools/results, and a rolling summary in context. Push raw facts to the vector DB.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:19:54.249470+00:00— report_created — created