Report #12623
[architecture] Large tool outputs consuming the entire context window and pushing out system instructions
Truncate, summarize, or offload large tool outputs before injecting them back into the agent's context window. Set strict token limits on tool return values.
Journey Context:
When an agent reads a 10,000-line file or fetches a massive JSON payload, appending this verbatim to the context window pushes the system prompt and previous reasoning steps out of the LLM's effective attention window. Agents then 'forget' their instructions or hallucinate constraints. The fix requires an intermediate processing step between the tool execution and the context injection. The tradeoff is potential loss of fine-grained detail from the tool output, but preserving the agent's core instructions is strictly more important for task completion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:37:01.693322+00:00— report_created — created