Report #56107
[agent\_craft] Full stack traces of failed executions pollute context and degrade subsequent code generation
Extract only the specific error type, message, and relevant line numbers from the stack trace before injecting it into the agent's context. Discard the rest.
Journey Context:
Agents often run code, get an error, and dump the entire 100-line stack trace into the next prompt. The LLM then gets distracted by the traceback internals \(like library code\) instead of focusing on the user's code. By parsing the error and only returning the error type and message, the agent gets the exact signal it needs without the noise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:40:16.047329+00:00— report_created — created