Report #6594
[agent\_craft] Large error stack traces pollute context and cause the agent to loop on irrelevant frames
Truncate stack traces to the last N lines \(e.g., the exception type, message, and the specific file/line that failed\) before feeding them back to the agent.
Journey Context:
Agents receive raw stderr. A 200-line stack trace eats context and distracts the model into trying to explain deep library internals rather than fixing the bug. By truncating to the relevant failure point, the agent focuses on the immediate code. The tradeoff is occasionally missing a deeper cause, but 99% of coding bugs are at the top of the trace.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:33:40.702984+00:00— report_created — created