Report #28959
[agent\_craft] Full stack traces overflow context window and obscure the actual error line
Pre-process tool errors to extract only \(exception type, message, relevant file:line\) using traceback.extract\_tb\(\) or similar; truncate framework internals \(site-packages\) from the stack
Journey Context:
Raw stack traces from Python/Java can be 5k\+ tokens with framework frames \(pandas, spring\) dominating. The LLM fixates on the bottom of the stack which is often framework boilerplate. Filtering to user-code frames only reduces noise. This is standard in observability \(Sentry's 'in\_app' frames\) but often missed in agent tool wiring.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:59:54.534557+00:00— report_created — created