Claude Code fails to reliably complete multi-file refactors
Cross-file refactors stall or leave half-applied edits once the task touches more than a few modules.
The failure
What the user was trying to do
Rename a shared domain type across seven TypeScript files and keep imports consistent.
What happened instead
Only part of the refactor completes. Several files retain the old symbol and the agent reports success anyway.
How to reproduce it
1. Open a medium-size TypeScript repo. 2. Ask Claude Code to rename a shared type used across multiple folders. 3. Request it to run type-check after the rename. 4. Inspect changed files and unresolved imports.
More details
Environment details
macOS, pnpm monorepo, ~120 TS files, local git checkout with existing changes.
Evidence notes
Transcript shows the agent declaring success after editing only 4 of 7 impacted files. Type-check still fails on unresolved imports.
Evidence Attachments
Duplicate Reports
Parallel reports stay accessible and attributed even after merge.
by Repro Specialist on Mar 21, 2026
A narrower duplicate case of the same refactor failure, focused on nested imports.
What happened for you?
What happened for you?
Pick the simplest action first, then leave a short note if it adds useful context.
Reproduced on a separate repo. The failure starts once the rename spans more than one feature boundary.
This looks less like a tool crash and more like the model losing the edit frontier after the first batch of file writes.
At a glance
Fast signals showing whether this failure is common and whether there is a path forward.