Report #75907
[synthesis] Agent loses track of the original task objective because its context window becomes dominated by cascading, irrelevant stack traces
Implement a 'stack trace summarizer' tool that extracts only the user-code frames from a traceback before feeding it to the LLM, and dynamically evict previous failed trace attempts from the conversation history using a sliding window or map-reduce summarization.
Journey Context:
When an agent hits an error, the easiest thing to do is dump the traceback into the prompt. But a Django or React traceback might be 200 lines, 190 of which are framework internals. The LLM's attention gets hijacked by the standard library code, and it starts trying to 'fix' os.py or react-dom.js. This leads to a cascade: it breaks the library, gets a new traceback, and fills the context. By strictly filtering tracebacks to only frames within the user's repo, and aggressively summarizing past failed attempts, the agent keeps its attention focused on the user's codebase and the high-level goal.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:00:36.929487+00:00— report_created — created