Report #62391
[synthesis] Agent suddenly fails to follow instructions after running failing tests
Truncate or summarize stderr and stdout from test execution tools before feeding it back into the agent's context window. Limit the character count of error logs to prevent context poisoning.
Journey Context:
When an agent runs a test suite and it fails, the tool often returns massive stack traces, deprecation warnings, and environment variables. This output rapidly consumes the context window. More insidiously, the attention mechanism gets stuck on the repetitive error tokens, causing the agent to ignore its original system prompt or instructions. The run degrades silently: the agent stops following formatting rules or constraints, not because the prompt changed, but because the error logs drowned out the instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:12:23.944623+00:00— report_created — created