[BUG] Installing native binary via PowerShell script installs 0KB claude.exe
Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Workaround ✓ Mentioned in thread ↓
Activity 9 comments · opened Oct 9, 2025 · closed Oct 10, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator)
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?
Claude updated itself to 2.0.12 then 2.0.13 and now when I try to run "claude" I get :
Program 'claude.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1
+ claude
+ ~~~~~~.
At line:1 char:1
+ claude
+ ~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : NativeCommandFailed
Looking in the install directory ([UserProfile]\.local\bin there is a claude.exe file that is 0KB in size
I tried installing directly from provided powershell script and get the same result
What Should Happen?
Claude should install correctly and be accessible via "claude" command without error
Error Messages/Logs
Steps to Reproduce
- Run
irm https://claude.ai/install.ps1 | iexin PowerShell - Run
claude - Fails
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.11
Claude Code Version
2.0.13
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
9 Comments
Can you check the contents of
%USERPROFILE%\.local\share\claude\versionsand see what files are in there?You may need to delete
%USERPROFILE%\.local\share\claude\and%USERPROFILE%\.local\bin\claude, then re-run the installation script.%USERPROFILE%\.local\share\claude\versionshad 2.0.12 and 2.0.13.I tried deleting .13 and installing again, but it just added another 0 KB .13 file.
I just tried deleting
%USERPROFILE%\.local\share\claude\and%USERPROFILE%\.local\bin\claudeand re-running the installation script and it has the same results.%USERPROFILE%\.local\bin\claude\claude.exe-> 0 KB%USERPROFILE%\.local\share\claude\2.0.13-> 0 KBI even tried restarting my PC to see if something needed to be cleared/released.
My co-worker was able to successfully update to 2.0.13, so I'm able to work around this for now by using his .exe.
same exact issue. can't run claude code on powershell anymore
Good to know it's not just me 😂
But sorry you're having the same issue.
I'm having the same issue.
This also repros for me.
Hey everyone!
After some debugging adventures, I found what's causing the 0-byte issue and how to fix it!
The Fix:
Fair warning: The installer will weirdly download itself _twice_ (once to
%USERPROFILE%\.claude\downloads\, then again to%USERPROFILE%\.cache\claude\staging\2.0.13\)While adding
--forceto the PowerShell script resolves the immediate user-facing issue, this appears to be masking an underlying bug in theclaude.exe installcommand itself.Root Cause Analysis: I think that the installer's update logic attempts to replace the running executable when an existing installation is detected, which fails on Windows due to file handle restrictions. This results in:
claude.exe(0 bytes)Request for Access to Build Scripts:
To properly diagnose and fix the root cause rather than applying workarounds, it would be helpful to review:
install.ps1generated/hosted? (It's served fromclaude.ai/install.ps1but doesn't appear in the main repository)claude.exe installthat handles updates and self-replacement%USERPROFILE%\.claude\downloads\and%USERPROFILE%\.cache\claude\staging\{version}\?Access to these would enable the community (or internal team) to:
Happy to help debug further if given access to the relevant codebases.
This is broken for Windows single-file executable versions 2.0.12-2.0.13, and will be fixed in the next release.
As a workaround, you can add
--forceto the install script as mentioned above (& $binaryPath install --force)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.