[BUG] Auto-update breaks claude.exe on Windows (NVM for Windows)
Status Fixed / completed
Reported on v2.1.123
Maintainer reply ✓ Yes — claude[bot]
Workaround ✓ Mentioned in description ↑
Activity 4 comments · opened Apr 29, 2026 · closed May 28, 2026
💡 Likely answer: A maintainer (claude[bot], contributor)
responded on this thread — see the highlighted reply below.
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?
Bug Description
When launching claude on Windows, the auto-update process renames claude.exe to claude.exe.old.<timestamp> but fails to replace it with the new version, leaving no claude.exe in the bin directory.
Workaround
Renaming the .old file back to claude.exe restores functionality, but the issue recurs on next launch.
Environment
- OS: Windows
- Node: v24.15.0
- Node manager: NVM for Windows
- Claude Code: installed globally via npm
What Should Happen?
The auto-update should either:
- Successfully download and place the new
claude.exebefore renaming the old one - Roll back to the original
claude.exeif the update fails - Not break the existing installation on failure
Error Messages/Logs
$ claude
/c/nvm4w/nodejs/claude: line 12: C:\nvm4w\nodejs/node_modules/@anthropic-ai/claude-code/bin/claude.exe: No such file or directory
claude
'"C:\nvm4w\nodejs\\node_modules\@anthropic-ai\claude-code\bin\claude.exe"' is not recognized as an internal or external command,
operable program or batch file.
Steps to Reproduce
- Install Claude Code globally via
npm install -g @anthropic-ai/claude-code - Run
claude— works fine - Close the session
- Run
claudeagain — fails with:
node_modules/@anthropic-ai/claude-code/bin/claude.exe: No such file or directory
- Inspecting the bin directory shows only
claude.exe.old.<timestamp>— noclaude.exe
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.123
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I've hit this same issue repeatedly over several months (npm global install, not NVM — standalone Node v22.13.1 in C:\Tools). Same pattern every time: auto-updater renames claude.exe to claude.exe.old.<timestamp>, fails to copy the new binary from the platform package, wrapper script points at nothing.
Rather than disabling the auto-updater, I replaced the claude.ps1 wrapper with a self-healing version that detects the missing binary and recovers from the platform package before launching. Drop-in replacement — auto-updates stay enabled, and when the updater fails, the next launch fixes itself automatically.
Replace your claude.ps1 (wherever npm installed it) with:
And the claude.cmd equivalent:
Hope this helps others until the updater is fixed properly.
This issue was fixed as of version 2.1.153.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.