AI how-to notes · 2026-09-17 · last run 2026-09-17 · 한국어 원문
Check a Claude Code native install on Windows in five minutes — claude doctor, PATH, and the versions folder
The short version
Check a Claude Code native install on Windows in this order: version, executable location, claude doctor, PATH, then the versions folder. On our machine there was exactly one executable path, and doctor printed No installation issues found.
This is about inspecting an install you already have, not about doing a fresh one. The install commands below are quoted from the official docs; we did not re-run them this time.
Who this is for
claude sometimes comes up as an old version. Or the "please update" notice keeps appearing. Or you followed a tutorial, installed via npm or winget, and later moved to the native installer. Or you simply do not know which claude is running right now.
What we tested on
| Item | Value |
|---|---|
| OS | Windows 11 Home (10.0.26200) |
| Shells | Git Bash, PowerShell 7 |
| Claude Code | 2.1.274 (Claude Code) |
| Install method | native (confirmed with claude doctor) |
The official install commands (not run here)
Source: code.claude.com/docs/en/setup (checked 2026-09-17). We did not reinstall during this check, so the commands below are quotations.
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex:: Windows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThe docs also list the errors you get when you mix the two up. Running the CMD version in PowerShell gives The token '&&' is not a valid statement separator; running the PowerShell version in CMD gives 'irm' is not recognized as an internal or external command. Administrator rights are not required ("You do not need to run as Administrator.").
Note that the && error comes from Windows PowerShell 5.1, the version built into Windows. PowerShell 7, which this note used, accepts && as a command chain operator (Microsoft docs: about_Pipeline_Chain_Operators). Either way, the least confusing option is to run the CMD command in a CMD window.
Check 1 — version and executable location
$ claude --version
2.1.274 (Claude Code)
$ where.exe claude
C:\Users\User\.local\bin\claude.exePowerShell's Get-Command claude -All also returned a single line, Application claude.exe C:\Users\User\.local\bin\claude.exe. If more than one path comes back, inspect each executable and figure out where it came from. The official install troubleshooting page (code.claude.com/docs/en/troubleshoot-install, checked 2026-09-17) says "If you find multiple installations, keep only one.", and names %USERPROFILE%\.local\bin\claude.exe as the recommended location.
We also checked that nothing was installed separately in the npm global prefix.
$ npm ls -g --depth=0 @anthropic-ai/claude-code
C:\Users\User\AppData\Roaming\npm
`-- (empty)@anthropic-ai/claude-code was not present in the npm global path we queried. Note that this returns exit code 1, which matters if you use it in a script.
Check 2 — claude doctor
The help text reads "Check the health of your Claude Code installation. Reads settings files in the current directory without a trust prompt.", and the setup docs describe it as something that "prints read-only installation and settings diagnostics without starting a session". We ran it from a scratch temp folder; it finished in roughly 3 seconds with exit code 0.
Claude Code doctor
Running: native (2.1.274)
Commit: 1efcc1361e64
Platform: win32-x64
Path: C:\Users\User\.local\bin\claude.exe
Config install method: native
Search: OK (bundled)
Auto-updates: enabled
Auto-update channel: latest
Last update attempt: success → 2.1.274 (2026-09-17)
Managed settings (remote): not fetched — requires an Enterprise or Team subscription
Organization policy: not applicable to Pro and Max accounts
...
No installation issues found.The five lines we look at first are Running, Path, Config install method, Auto-updates, and Last update attempt.
Check 3 — PATH
We took the Select-String command from the docs and added one Test-Path line to confirm the executable is there.
$env:PATH -split ';' | Select-String '\.local\\bin'
Test-Path "$env:USERPROFILE\.local\bin\claude.exe"C:\Users\User\.local\bin
TrueThis run of where.exe claude and Get-Command claude -All found .local\bin\claude.exe in one place only.
While writing this script through a shell, the \\ once collapsed to a single \, leaving '\.local\bin' in the file. When that happens, \b is read as a regex word boundary, so no PATH line prints and you get only True. If the result comes back empty, check the pattern before you start editing PATH.
Check 4 — the versions folder and zero-byte files
On this Windows machine, %USERPROFILE%\.local\share\claude\versions\ held one file per version. The symlink description in the docs ("the native installer manages the launcher at ~/.local/bin/claude as a symlink into ~/.local/share/claude/versions/") applies to macOS and Linux. Our folder looked like this.
| File | Size (bytes) | Date |
|---|---|---|
versions\2.1.272 | 230,228,640 | Sep 15 |
versions\2.1.273 | 231,776,416 | Sep 16 |
versions\2.1.274 | 233,691,808 | Sep 17 |
bin\claude.exe | 233,691,808 | Sep 17 |
bin\claude.exe.old.1789516666871 | 230,228,640 | Sep 15 |
bin\claude.exe.old.1789604169187 | 231,776,416 | Sep 16 |
The SHA-256 of bin\claude.exe and versions\2.1.274 matched at 4e4c1746…da117e. There were no zero-byte files.
find ~/.local/share/claude/versions -maxdepth 1 -type f -size 0
sha256sum ~/.local/bin/claude.exe ~/.local/share/claude/versions/2.1.274If the first command prints a path, that folder contains a regular file of zero bytes.
What happened on our machine back in August
The following was not reproduced during this September 17 check, and we are not including the command logs from the time. Treat it as background.
Until August 14 our machine ran the winget install (Anthropic.ClaudeCode). The newest version in the winget repository was 2.1.229 while the actual latest was 2.1.232, so winget upgrade reported nothing to do while Claude Code kept nagging us to update. That is why we moved to the native install.
The next day brought repeated "Auto-update failed" notices. At that point the versions\<version> file was sitting there at zero bytes, and claude update printed only Updating to X..., exited 0, and changed nothing. We fixed it by downloading a file matching the size and checksum in the release manifest.json, dropping it into place, and running claude update.
The official docs state "WinGet installations do not auto-update." and tell you to update with winget upgrade Anthropic.ClaudeCode. Our doctor output this time reads Auto-updates: enabled. If you are already on the native install, it is safer not to layer a winget install or npm install -g @anthropic-ai/claude-code on top. Two claude executables make it easy to lose track of which one runs.
Results
| Check | Command | Our result |
|---|---|---|
| Version | claude --version | 2.1.274 (Claude Code) |
| Location | where.exe claude | one path, .local\bin\claude.exe |
| npm duplicate | npm ls -g --depth=0 @anthropic-ai/claude-code | (empty) |
| Install method | claude doctor | native, No installation issues found. |
| PATH | the docs' Select-String | .local\bin present |
| Zero-byte files | find … -size 0 | none |
| Executable match | sha256sum | bin\claude.exe = versions\2.1.274 |
What didn't work
Our first two runs of the PATH script used a pattern whose backslash had collapsed (see check 3). Both runs produced no PATH match and only the True from Test-Path. Rewriting the file gave correct output on the third attempt.
What we did not check
- Actually running the install commands (
install.ps1,install.cmd). We did not reinstall this time. - Running
claude updateorclaude install. We only read the help text (Check for updates and install if available). - The in-session
/doctor, which also repairs things. - Whether the
.old.<number>files are safe to delete, and when they get cleaned up. - How
bin\claude.exeis swapped on Windows (a copy, or something else). - WSL installs.