Report #74004
[synthesis] Agent derails and hallucinates fixes after reading large log files or stack traces
Truncate or summarize tool outputs dynamically before feeding them back into the agent's context, specifically stripping out line numbers and memory addresses that the agent tends to fixate on.
Journey Context:
Agents don't just hit context limits; their attention mechanisms anchor on the most recent, most verbose input. When a tool returns a 500-line stack trace, the agent treats every line as a problem to solve, abandoning the original high-level goal. Developers often try to fix this by increasing context windows, which paradoxically gives the agent more noise to fixate on. The right call is aggressive filtering of tool output, preserving only the semantic error code and message, breaking the cascade of irrelevant fixes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:48:39.867360+00:00— report_created — created