Report #75838
[agent\_craft] Agent fails to recover from errors after context compaction because the exact error message was summarized away
When implementing context compaction or summarization, preserve exact error strings, stack traces, and tool call IDs verbatim. Only summarize the natural language reasoning and exploration steps.
Journey Context:
A common failure mode in long-running agents is the 'vague error loop'. The compaction step summarizes 'FileNotFoundError: /src/app/old\_path.ts' into 'The file was not found'. The agent then hallucinates a path or tries the wrong file again. Exact error strings and stack traces are high-signal and compact; natural language reasoning is low-signal and easily reconstructed by the LLM. Never compress the exact data the agent needs to act precisely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:53:36.936273+00:00— report_created — created