[BUG] Auto-update to 2.1.237 leaves broken stub on Windows: claude-code-win32-x64@2.1.237 missing from npm registry (incomplete release)

Status Open
Reported on v2.1.236
Maintainer reply None cached
Activity 4 comments · opened Aug 20, 2026

Summary

Auto-updating from 2.1.236 → 2.1.237 on Windows (npm-global) leaves bin/claude.exe as a ~500-byte fallback text stub instead of the native binary, so claude fails to start with:

Program 'claude.exe' failed to run: The specified executable is not a valid application for this OS platform.

Root cause is publish-side, not local: the platform-native package @anthropic-ai/claude-code-win32-x64@2.1.237 does not exist on the npm registry (404), even though the main package @anthropic-ai/claude-code@2.1.237 is published and tagged latest and declares that exact version as an optional dependency. Because it is an optional dependency, npm silently skips the 404, postinstall falls back to the stub, and the built-in auto-updater still records the update as success. Downgrading to 2.1.236 fixes it (the 236 native package does exist).

This looks like an incomplete release of 2.1.237 (main JS package published, win32-x64 — and possibly all platform binaries — not published).

Environment

  • claude-code: 2.1.237 (npm-global), was working on 2.1.236
  • node: v24.19.0
  • OS: Windows 11 Enterprise 26200, x64
  • Install path (nvm4w): C:\nvm4w\nodejs\node_modules\@anthropic-ai\claude-code

Evidence

1. Auto-updater log — it upgraded to 237 and called it success (~/.claude/.last-update-result.json):

{"timestamp":"2026-08-20T01:29:25.000Z","path":"npm-global","outcome":"success","status":"success","version_from":"2.1.236","version_to":"2.1.237","error_code":null}

2. The native win32-x64 package for 2.1.237 is missing from the registry:

$ 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 view @anthropic-ai/claude-code-win32-x64 versions --json   # tail
  ... "2.1.234","2.1.235","2.1.236"]     # <-- stops at 236, no 237

$ npm view @anthropic-ai/claude-code-win32-x64@2.1.236 version
2.1.236                                   # <-- 236 exists

3. The main 2.1.237 package nonetheless declares 237 native deps as optional:

$ npm view @anthropic-ai/claude-code@2.1.237 optionalDependencies
{
  '@anthropic-ai/claude-code-win32-x64': '2.1.237',
  ...  # all 8 platforms pinned to 2.1.237
}

4. Resulting broken claude.exe is a 500-byte text stub, not a binary:

$ file .../claude-code/bin/claude.exe
.../claude.exe: ASCII text          # should be a multi-MB PE binary

$ cat .../claude-code/bin/claude.exe
echo "Error: claude native binary not installed." >&2
...
echo "  node node_modules/@anthropic-ai/claude-code/install.cjs" >&2
exit 1

5. Manual postinstall confirms the package can't be fetched:

$ node install.cjs
[@anthropic-ai/claude-code postinstall] Native package "@anthropic-ai/claude-code-win32-x64" not found.

npm install -g @anthropic-ai/claude-code@latest --include=optional does not fix it — the win32-x64@2.1.237 tarball simply isn't on the registry to download.

Reproduction

  1. On Windows x64 with an npm-global install on 2.1.236, let the auto-updater run (or npm i -g @anthropic-ai/claude-code@2.1.237).
  2. Run claude → "not a valid application for this OS platform".
  3. Confirm: npm view @anthropic-ai/claude-code-win32-x64@2.1.237 version → E404.

Expected

  • Either the 2.1.237 platform-native packages get published so the latest main package can actually install, or 2.1.237 is unpublished / latest moved back until the binaries are up.
  • The auto-updater should verify the resolved native binary is a real executable (not the fallback stub) before recording outcome:success — a missing optional platform binary should fail the update and trigger rollback, not be silently swallowed.

Workaround

npm install -g @anthropic-ai/claude-code@2.1.236

Optionally set DISABLE_AUTOUPDATER=1 to avoid being pushed back onto 2.1.237.

Related but distinct

  • #88091 (macOS, concurrent sessions racing → ENOTEMPTY + stub) and #76631 (interrupted macOS update → half-install) show the same 500-byte-stub symptom, but their root cause is a local race / interrupted rename. This report's root cause is different: the 2.1.237 win32-x64 package is absent from the registry entirely, so even a clean, single-process, --include=optional install cannot succeed.

View original on GitHub ↗

4 Comments

lwy521 · 11 days ago

Reproduced on same setup: Windows 11 Enterprise 26200 x64. Same workaround works: npm i -g @anthropic-ai/claude-code@2.1.236. Waiting on the native package publish.

zaiplanet · 11 days ago

Win10 22H2 same problem with ver 2.1.237 (autoupdate) .
This workaround works: npm i -g @anthropic-ai/claude-code@2.1.236
Thanks for share bro.

HenriqueMazini · 11 days ago

Confirming this on linux-x64, which supports the "possibly all platform binaries" hypothesis in the original report — it is not Windows-specific.

Environment: claude-code 2.1.237 (npm-global via nvm), node v24.19.0, npm 11.17.0, Ubuntu (kernel 7.0.0-29-generic), x64.

Registry state is the same for linux-x64:

$ npm view @anthropic-ai/claude-code-linux-x64 version
2.1.236

$ npm view @anthropic-ai/claude-code-linux-x64@2.1.237 version
npm error 404 tarball, folder, http url, or git url.

$ npm view @anthropic-ai/claude-code dist-tags
{ stable: '2.1.228', latest: '2.1.237', next: '2.1.237' }

The main package still declares "@anthropic-ai/claude-code-linux-x64": "2.1.237" in optionalDependencies, so npm skips the 404 silently and the install completes "successfully" with no native package anywhere under the global scope.

Different symptom than Windows. There is no stub binary — the launcher prints an explicit message instead:

Error: claude native binary not installed.

Either postinstall did not run (--ignore-scripts, some pnpm configs)
or the platform-native optional dependency was not downloaded (--omit=optional).

Run the postinstall manually (adjust path for local vs global install):
  node node_modules/@anthropic-ai/claude-code/install.cjs

Or reinstall without --ignore-scripts / --omit=optional.

That message sends you down the wrong path, which is worth fixing independently of the release itself. Neither cause it names applied here:

$ npm config get omit            # (empty)
$ npm config get ignore-scripts  # false
$ ls ~/.npmrc                    # no such file (none at any level)

And running the suggested install.cjs does not help, because it only links an already-downloaded native package — it never fetches one:

[@anthropic-ai/claude-code postinstall] Native package "@anthropic-ai/claude-code-linux-x64" not found.
  This happens with --omit=optional or when the download failed.

So a user following the error message's own advice ends up stuck, with the true cause (an incomplete publish) never surfaced. Something like "the native package for this version may not be published yet — try installing the previous version" would save a lot of time.

Workaround confirms the diagnosis — downgrading is enough, no flags needed:

$ npm i -g @anthropic-ai/claude-code@2.1.236
added 1 package, and changed 1 package in 2s

$ claude --version
2.1.236 (Claude Code)

The native package then lands nested, as expected:
@anthropic-ai/claude-code/node_modules/@anthropic-ai/claude-code-linux-x64/claude

One side note for anyone reproducing on npm >= 11.17: the install prints

npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts   @anthropic-ai/claude-code@2.1.236 (postinstall: node install.cjs)

i.e. the postinstall is now blocked by default. It did not matter here — the native package arrives as a normal dependency resolution and the launcher finds it — but it means "just run the postinstall" is not a reliable fallback on current npm either.

MilkyWay008 · 10 days ago

Saw the same 404 on win32-x64@2.1.237, the native binary for that build just isn't in the registry yet. The auto-updater logs success while leaving the stub in bin/claude.exe, which is the confusing part. Downgrade back to 2.1.236 for now, that's the last build with the real binary published and it works, then re-run the update in a few days once 237's platform packages are up. Oh, btw, in case it might help that, I built a portable Hermes OTG repo, check it, imo it may be able to help you diagnose and figure out the fix in no time. https://github.com/MilkyWay008/Hermes-OTG