Report #82952
[synthesis] Agent enters syntax error death spiral after linter output floods context
Truncate linter/formatter stderr to only the first 3 errors or a maximum of 20 lines, and use a strict exit-code check rather than feeding the entire verbose output back to the agent.
Journey Context:
Agents often run linters as a validation step. When a file has many violations, the linter output consumes massive context, pushing the original task out of the window. The agent then attempts to fix all warnings simultaneously, often crossing edit boundaries and introducing syntax errors. The subsequent run fails with a parser error, but the agent's context is now poisoned with the old warnings and new errors, leading to confident but catastrophic rewrites. Limiting the error signal forces the agent into a tight, successful fix loop rather than an overwhelming cascade.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:49:33.786034+00:00— report_created — created