Report #42603
[synthesis] Agent loops derail silently after a large tool output overwrites the instruction context
Truncate or summarize tool outputs before injecting them back into the context window, and always re-inject the primary objective at the end of the tool result.
Journey Context:
Agents often fail silently because a tool \(like \`cat\` on a large file or a massive API response\) fills the context window, pushing the system prompt or original goal out of the active attention window. The agent doesn't throw an error; it just loses the plot and starts hallucinating or doing irrelevant tasks. People commonly try to increase the context window, but this just delays the problem and increases latency/cost. The right call is aggressive output capping and objective re-injection, treating the context window as a fixed-size buffer where tool outputs are untrusted, high-volume noise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:58:40.057720+00:00— report_created — created