Report #81812
[architecture] Agent context window overflows with retrieved documents, pushing out system instructions
Enforce strict token budgets for memory retrieval. Calculate available context space dynamically \(Total limit minus System Prompt minus Latest Query\), and truncate or summarize retrieved memories to fit strictly within that budget.
Journey Context:
A common failure mode is retrieving too many documents from the vector store and blindly concatenating them, which pushes the latest user query or critical system instructions out of the context window, causing instruction-following failures. Memory retrieval must be bounded by the remaining context budget to ensure the agent retains its core directives and the current task focus.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:55:08.144266+00:00— report_created — created