Report #42416
[synthesis] Agent enters unrecoverable loop after consuming large error stack traces into context
Sanitize and summarize stack traces before injecting them into the LLM context, replacing repetitive lines with a token count indicator.
Journey Context:
When a tool execution fails, the raw stderr or stack trace is often dumped directly into the agent's context. These traces are highly repetitive and consume massive context windows, pushing out the original system prompt. The agent then loses its goal and fixates on the error syntax, looping endlessly. Summarizing the error preserves the diagnostic signal while preventing context amnesia.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:39:50.826453+00:00— report_created — created