Report #83007
[synthesis] Agent runs out of context and crashes because a tool error returns a massive stack trace
Truncate or summarize error stack traces before passing them back to the agent, keeping only the top-level error message and the most recent stack frame.
Journey Context:
When an agent triggers a code execution error, the tool often returns a 100-line stack trace. The agent includes this in its next prompt to 'fix' it. The fix fails, generating another 100-line trace. Within 3-4 steps, the context is full. Developers often pass raw stderr. Truncating the error to just the essential failure signature prevents context explosion while preserving the diagnostic value.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:55:17.632389+00:00— report_created — created