Report #10550
[architecture] Agent exceeds context window or hallucinates by stuffing entire conversation history into prompt
Implement a two-tier memory architecture: working memory \(context window\) for the immediate task, and long-term memory \(vector store\) for historical facts. Only promote summarized facts to long-term memory upon task completion.
Journey Context:
Agents often fail because LLM context windows are finite and attention mechanisms degrade with length \(Lost in the Middle\). Naively retrieving and injecting raw text from a vector DB also fails because it lacks conversational continuity. The two-tier approach keeps the active context lean while providing a retrieval backfill, balancing recency and historical depth. Without this, agents either hit token limits or lose the plot midway through complex tasks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:06:06.221453+00:00— report_created — created