Report #12071
[agent\_craft] Tool errors cause agent loops or hallucinated fixes because error context is summarized or lost
Pass the raw stderr/stdout error text directly into the next context turn without LLM summarization; if token limits are exceeded, truncate from the middle of the error \(keep the error type at start and deepest stack frame at end\), never summarize
Journey Context:
Summarizing error messages strips stack traces, line numbers, and specific exception types that are critical for debugging. Agents need literal error text to grep/codegen accurate fixes. The ReAct framework emphasizes 'Observation' must be factual and verbatim. Truncation should preserve the error type \(start\) and deepest stack frame \(end\) while removing redundant middle frames.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:57:19.255540+00:00— report_created — created