[BUG] Auto-updater silently fails on Windows when VS Code extension is active (regression since 2.1.147)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Until ~May 13, 2026 the Claude Code CLI auto-updater worked daily without intervention on my Windows + VS Code setup. Since then, it silently stopped advancing past 2.1.145, skipping 2.1.146, 2.1.147, 2.1.148, 2.1.149 over multiple days. No prompt, no notification, no visible error — the CLI just stayed pinned to 2.1.145 while npm had newer versions available.
A manual npm install -g @anthropic-ai/claude-code@latest from an external admin cmd succeeds only after closing all VS Code windows. Run from inside VS Code or with the extension still active, it fails with EBUSY because the VS Code extension keeps claude.exe file-locked.
Suspected cause: the 2.1.147 changelog states "Improved auto-updater: retries transient network failures, reports specific error categories and OS error codes on failure, and shows the current version when an update fails". The pre-2.1.147 auto-updater apparently used a binary-replacement strategy (rename + replace, or detached spawn) that bypassed the Windows file lock held by the VS Code extension. The new updater in 2.1.147+ no longer bypasses this lock, so on Windows + VS Code extension active the update fails silently and the user stays on the old version indefinitely with no signal.
This is consistent with existing issue #13085 ("Another process is currently updating Claude"), but with a critical difference: there is no user-visible prompt or error — the auto-updater fails silently.
What Should Happen?
Either:
(a) The CLI updates successfully via the same out-of-process / rename-replace strategy used pre-2.1.147, OR
(b) The CLI surfaces a clear, persistent notification that the auto-update has failed and manual intervention is needed (citing the EBUSY/lock cause and suggesting "close VS Code and run npm install -g @anthropic-ai/claude-code@latest").
Error Messages/Logs
npm error code EBUSY
npm error syscall copyfile
npm error path C:\Users\<user>\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe
npm error dest C:\Users\<user>\AppData\Roaming\npm\node_modules\@anthropic-ai\.claude-code-RuDGmORB\node_modules\@anthropic-ai\claude-code-win32-x64\claude.exe
npm error errno -4082
npm error EBUSY: resource busy or locked, copyfile '...claude.exe' -> '...claude.exe'
Full log: C:\Users\<user>\AppData\Local\npm-cache\_logs\2026-05-23T07_03_51_287Z-debug-0.log
Steps to Reproduce
- Install Claude Code CLI globally via npm on Windows:
npm install -g @anthropic-ai/claude-code - Install the
anthropic.claude-codeVS Code extension and keep VS Code open. - Use Claude Code daily for ~1 week across multiple npm releases.
- Observe:
claude --versionstays pinned to the version installed at step 1; the CLI never updates despite newer versions being available on npm. - Attempt manual
npm install -g @anthropic-ai/claude-code@latestfrom within VS Code's integrated terminal or while VS Code is open → fails with EBUSY. - Close all VS Code windows, run the same command from external admin cmd → succeeds.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.145
Claude Code Version
2.1.150 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Related issues:
- #13085 (lock during external
claude update) - #6484 / #6555 (infinite update prompt loop — same root cause, different surface symptom)
- #53969 (auto-update behavior issues on VS Code extension)
The 2.1.148 release already contains a fix for another regression introduced by 2.1.147 ("Fixed the Bash tool returning exit code 127 on every command for some users, a regression introduced in 2.1.147"), suggesting the 2.1.147 release introduced multiple regressions. This auto-updater issue may be another one in the same cluster.
Setup details:
- Claude Code CLI: was 2.1.145, manually upgraded to 2.1.150 today
- Claude Code VS Code extension: 2.1.145 (anthropic.claude-code), auto-update enabled, marketplace currently shows no newer version available
- OS: Windows 11 Pro 10.0.26200
- npm global install path: C:\Users\<user>\AppData\Roaming\npm\
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗