[BUG] Auto-update breaks claude.exe on Windows (NVM for Windows)

Resolved 💬 3 comments Opened Apr 29, 2026 by itzhakl Closed May 28, 2026

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:

  1. Successfully download and place the new claude.exe before renaming the old one
  2. Roll back to the original claude.exe if the update fails
  3. 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

  1. Install Claude Code globally via npm install -g @anthropic-ai/claude-code
  2. Run claude — works fine
  3. Close the session
  4. Run claude again — fails with:

node_modules/@anthropic-ai/claude-code/bin/claude.exe: No such file or directory

  1. Inspecting the bin directory shows only claude.exe.old.<timestamp> — no claude.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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗