Agents ignore pre-existing errors and skip fixing them
Resolved 💬 1 comment Opened Mar 30, 2026 by niftybot-john Closed Mar 30, 2026
Problem
When spawning agents (via Agent tool with worktrees) to perform multi-step tasks, agents consistently refuse to fix pre-existing errors they encounter during build/typecheck steps. They say things like:
- "All these are pre-existing errors — none relate to my changes"
- "The errors at line 1283 and 1315 are pre-existing, not caused by my changes"
- "10 pre-existing type errors in unrelated files"
And then proceed to commit and push without fixing them.
Expected behavior
Agents should fix ALL errors they encounter during their work, not just ones they caused. When an agent runs a typecheck and sees errors, those errors should be fixed before committing — regardless of who introduced them.
Additional issues
- Agents push directly to main integration branches (triggering CI) instead of using feature branches + PRs, burning through GitHub Actions minutes rapidly
- Even when explicitly told in the prompt to fix all errors, agents still skip "pre-existing" ones
- The behavior persists across multiple agent spawns in the same session despite repeated corrections
Impact
- Errors accumulate because every agent thinks it's someone else's problem
- GitHub Actions minutes get burned (we used 90% of monthly quota in one session)
- User has to repeatedly correct the same behavior
Environment
- Claude Code CLI
- Using Agent tool with
isolation: "worktree"andmode: "bypassPermissions"
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗