[BUG] 2.1.237 tagged `latest` with its linux-x64, win32-x64 and linux-x64-musl native packages never published - installs land on a dead 500-byte stub
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
@anthropic-ai/claude-code@2.1.237 is published and tagged latest, but three of its eight platform-native optionalDependencies were never published to the registry:
| native package | 2.1.237 published? | its own latest |
|---|---|---|
| @anthropic-ai/claude-code-linux-x64 | ❌ no | 2.1.236 |
| @anthropic-ai/claude-code-win32-x64 | ❌ no | 2.1.236 |
| @anthropic-ai/claude-code-linux-x64-musl | ❌ no | 2.1.236 |
| @anthropic-ai/claude-code-darwin-x64 | ✅ yes | 2.1.237 |
| @anthropic-ai/claude-code-darwin-arm64 | ✅ yes | 2.1.237 |
| @anthropic-ai/claude-code-linux-arm64 | ✅ yes | 2.1.237 |
| @anthropic-ai/claude-code-linux-arm64-musl | ✅ yes | 2.1.237 |
| @anthropic-ai/claude-code-win32-arm64 | ✅ yes | 2.1.237 |
The 2.1.237 package.json declares all eight at "2.1.237" exactly. npm resolves an absent optional dependency as "skip, no error", so the install exits 0, install.cjs finds nothing to copy, and bin/claude.exe is left as the 500-byte placeholder stub. The CLI is dead on arrival for Windows x64 and Linux x64 (glibc and musl) — i.e. most installs.
On Windows the symptom is actively misleading, because the stub is a sh script named .exe:
Program 'claude.exe' failed to run: An error occurred trying to start process
'...\node_modules\@anthropic-ai\claude-code\bin\claude.exe'
with working directory '...'. The specified executable is not a valid application
for this OS platform.
That reads as an architecture mismatch and sends you looking in the wrong place entirely.
This is not #84081 (blocked allowScripts), and the fix there does not apply here. I hit the allowScripts warning too and cleared it, and the install still produced the stub — because with --allow-scripts the postinstall does run, and then reports the package simply is not there:
[@anthropic-ai/claude-code postinstall] Native package "@anthropic-ai/claude-code-win32-x64" not found.
This happens with --omit=optional or when the download failed.
No flags, no policy and no amount of retrying can fix this on the user side. The artifact does not exist.
Publish timestamps, for what they suggest about the release process:
claude-code 2.1.236 2026-08-19T18:45:14Z
claude-code-win32-x64 2.1.236 2026-08-19T19:24:23Z <- native published ~39 min AFTER the main package
claude-code 2.1.237 2026-08-19T23:57:54Z
claude-code-win32-x64 2.1.237 absent (checked 2026-08-20T01:13Z, ~1h16m later)
For 2.1.236 the main package was also published before its natives, so there is an existing window where latest is unusable on every platform. 2.1.237 looks like the same window that never closed for three of the eight targets. If that ordering is intended, the window is the bug; if the three builds failed in CI, the release should not have been tagged latest regardless.
What Should Happen?
Short term — either publish the three missing native packages, or move the latest dist-tag back to 2.1.236 until they exist. Right now npm i -g @anthropic-ai/claude-code hands a Windows x64 or Linux x64 user a broken install with a success exit code.
Longer term:
- Publish natives before the package that depends on them, and tag
latestonly once every declaredoptionalDependencyresolves. The 39-minute gap on2.1.236shows the ordering is currently the other way round. - Fail the install loudly when the platform-native package is absent. Exiting 0 with a non-functional binary is the shared root cause of this issue, #84081, #84051 and #85154 — four different routes into the identical dead 500-byte stub.
install.cjsalready detects the condition and prints it; it should exit non-zero. - A release gate that verifies all eight optional deps resolve at the published version before the dist-tag moves would have caught this one before any user did.
Error Messages/Logs
Registry state, reproducible right now:
$ npm view @anthropic-ai/claude-code@2.1.237 optionalDependencies
{
'@anthropic-ai/claude-code-linux-x64': '2.1.237',
'@anthropic-ai/claude-code-win32-x64': '2.1.237',
...
}
$ npm view @anthropic-ai/claude-code-win32-x64@2.1.237 version
npm error code E404
npm error 404 No match found for version 2.1.237
npm error 404 The requested resource '@anthropic-ai/claude-code-win32-x64@2.1.237'
npm error 404 could not be found or you do not have permission to access it.
$ npm view @anthropic-ai/claude-code-win32-x64 dist-tags
{ stable: '2.1.228', next: '2.1.236', latest: '2.1.236' }
$ npm view @anthropic-ai/claude-code dist-tags
{ stable: '2.1.228', latest: '2.1.237', next: '2.1.237' }
Resulting install:
$ npm i -g @anthropic-ai/claude-code
changed 1 package in 663ms
$ ls -l node_modules/@anthropic-ai/claude-code/bin/claude.exe
500 bytes # healthy binary on this platform is 330,097,824 bytes
Contents of that 500-byte claude.exe:
echo "Error: claude native binary not installed." >&2
echo "Either postinstall did not run (--ignore-scripts, some pnpm configs)" >&2
echo "or the platform-native optional dependency was not downloaded" >&2
Steps to Reproduce
- On Windows x64 (or Linux x64), run
npm i -g @anthropic-ai/claude-code - Install exits 0
- Run
claude— fails with the OS-platform error above - Run
npm i -g --allow-scripts=@anthropic-ai/claude-code @anthropic-ai/claude-codeto rule out #84081. Still 500 bytes. - Run
node node_modules/@anthropic-ai/claude-code/install.cjsmanually. It reports the native package is not found. npm view @anthropic-ai/claude-code-win32-x64@2.1.237 version→ E404. It was never published.
Workaround for users: pin to the last version whose natives exist.
npm i -g @anthropic-ai/claude-code@2.1.236 # verified working, 330 MB binary
npm i -g @anthropic-ai/claude-code@stable # 2.1.228, also fine
Note for anyone repairing this with live sessions open: on Windows the running claude.exe cannot be deleted, but npm renames the old tree to node_modules/@anthropic-ai/.claude-code-<random>/ and the running sessions keep working from there. The reinstall is safe with sessions open; it just leaves that ~326 MB directory behind with an EPERM cleanup warning until they exit.
Is this a regression?
Yes, against 2.1.236, whose win32-x64 native is published and installs correctly.
Version
Broken: 2.1.237. Working: 2.1.236.
- Windows 11 Pro, 10.0.26200, x64
- node
v26.4.0, npm11.17.0 - npm global prefix outside Program Files
Related: #84081 (blocked allowScripts), #84051 (interrupted update), #85154 (stub + missing symlink), #88091 (concurrent-session update race) — all four land on the same 500-byte stub by a different route, which is the argument for fixing the exit code in install.cjs.
Showing cached comments. Read the full discussion on GitHub ↗
7 Comments
Yep, 2.1.237 broke claude for me under WSL2/Arch as well.
Following up with something that makes this worse than a one-off bad install: the background auto-updater reinstalls the broken version on its own, so repairing it does not stick.
Timeline on my machine (Windows 11 x64, npm-global under a conda prefix):
Ten minutes. No user action in between. So for anyone on
win32-x64,linux-x64orlinux-x64-muslright now, this is not "installlatestand get a broken CLI once" — it is a loop. You repair it, and the updater walks it back into the stub on its next check. Pinning to2.1.236is not sufficient on its own, because nothing in the install expresses the pin to the updater.Workaround, for anyone hitting this before it is fixed upstream
Set the kill switch first, then repair — otherwise the repair is on a timer:
I verified the variable is actually read by the binary before trusting it —
findstr /M /C:"DISABLE_AUTOUPDATER"against the 326 MBclaude.exehits, as doautoUpdatesandautoUpdaterStatus. Setting a variable the binary ignores would look exactly like a working fix until the next update landed.⚠️ It applies per session, at startup. Sessions already running when you set it keep their own updater and can still re-break the install. Restart every live session, or the loop continues from the old ones. I had four alive and this cost me a second repair.
Remove the variable once the missing native packages are published.
Two things from the repair that may be useful for the fix itself
1.
install.cjscan exit 0 having produced a version-mismatched install. After one retry it left me withpackage.jsonreporting2.1.237whileclaude --versionreported2.1.236. The native package was not in the tree at all;install.cjshad fallen back to the localbin\claude.exe.old.<timestamp>left by the previous update's rename. The CLI runs, so nothing looks wrong, but the wrapper and the binary disagree about what is installed. A clean reinstall of2.1.236brought both into line. This is a second silent-success path in the same script, alongside the missing-native one — checking--versionalone does not detect it.2.
EBUSYon placing the binary can be transient. One attempt died withEBUSY: resource busy or locked, unlink 'bin\claude.exe'. A lock probe seconds later returned free, and no process was executing that path — the live sessions run the renamed copy, not the stub. A retry succeeded on the first try. Worth a short retry loop ininstall.cjsrather than surfacing it as a hard failure, since on Windows this is most likely a scanner or the just-finished write rather than a real holder.Both of these reinforce the original ask:
install.cjsexiting non-zero when it cannot place the correct binary would turn all of these into a loud failure instead of a working-looking install.The workaround (npm i -g @anthropic-ai/claude-code@2.1.236) works, but most users hitting this won't know to look for it — they'll just conclude Claude Code is broken on their platform.
confirmed on NixOS (glibc x86_64) with mise/aube as npm backend.
aube add --global @anthropic-ai/claude-code@2.1.237fails because@anthropic-ai/claude-code-linux-x64@2.1.237does not resolve. npm with--omit=optionalinstalls but leaves the 500-byte stub, soclaudeis non-functional.of the eight
optionalDependenciesdeclared at 2.1.237, only these four exist (as issue author stated):@anthropic-ai/claude-code-darwin-x642.1.237@anthropic-ai/claude-code-darwin-arm642.1.237@anthropic-ai/claude-code-linux-arm642.1.237@anthropic-ai/claude-code-win32-arm642.1.237these three are 404:
@anthropic-ai/claude-code-linux-x642.1.237@anthropic-ai/claude-code-linux-x64-musl2.1.237@anthropic-ai/claude-code-win32-x642.1.237as my (and 95% of the world) machine(s) needs
linux-x64, which is missing, claude errors/freezes, was only easy to debug due to experience with mise/nix/aube/npm. pinning to2.1.236works as statedSame issue on Windows 11 Enterprise 26200 x64, node v26.5.0. Auto-updated from 2.1.236 to 2.1.237. Confirmed win32-x64 native is E404 on registry. Workaround npm i -g @anthropic-ai/claude-code@2.1.236 fixed it. Please publish the missing native or move latest back to 236.
Linux x64 data point, and a correction to the "safe with sessions open" note.
1. The downgrade does not hold on npm-global Linux installs.
npm i -g @anthropic-ai/claude-code@2.1.236restores a working CLI, but the background updater re-applies 2.1.237 on the next launch and the install returns to the stub. Repaired it twice, broke twice. The workaround needsDISABLE_AUTOUPDATER=1in~/.claude/settings.json(orautoUpdatesChannel: "stable") set before the reinstall, otherwise the pin is silently undone.2. On Linux, the in-place update is not safe with sessions open.
The note about npm renaming the old tree so running sessions keep working did not hold here. The update was applied mid-run to a background session, after which the background service could no longer be spawned:
The session still appeared in
claude agentsbut selecting it did nothing — it was unreachable. Roughly three hours of work was lost. The workflow ran under a custom skill that only produces usable output on completion, so the partial artifacts on disk were worthless.That makes this more than a broken install: on the
latestchannel the updater will keep pulling 2.1.237 into working installations and killing whatever is running at the time. Possibly overlapping with #88091.Note this is npm 10.9.8 / node 22, a different generation from the report above (npm 11 / node 26) — the missing artifact breaks the install regardless of npm version, as expected for a package that simply is not on the registry.
Env: Ubuntu 26.04 LTS, Linux x64, node v22.23.1, npm 10.9.8, npm global prefix under
$HOME, auto-updated from 2.1.235.+1. Confirming this on Windows 11 x64. My auto-update ran this morning and the same thing happened. Here's the full evidence chain from my machine, in case it helps:
Environment
npm i -g @anthropic-ai/claude-code)Symptom
After the auto-update,
claudein a fresh terminal fails immediately:bin/claude.exein the global install is a 500-byte placeholder stub (theecho "Error: claude native binary not installed..."script), not a real PE binary. The platform package@anthropic-ai/claude-code-win32-x64is absent fromnode_modules/@anthropic-ai/.The only session still alive is the one that was launched 14 seconds before the update finished (PID started 01:58:13Z, update completed 01:58:27Z) — its 2.1.236 binary is memory-mapped, so it keeps running. Any new session cannot be started at all until this is fixed.