Repository navigation
Description
Note
Drafted by Claude Opus 5.5 in Claude Code; reviewed and posted by @jieyuexing
Area
apps/server
Steps to reproduce
- Run a T3 server on Windows where the Claude provider is an npm global install (
binaryPath: claude, resolved to%APPDATA%\npm\claude.cmd), on a slow network. - With a Claude update available, start the provider update from another machine's desktop app (Update everything, or the provider's Update button).
- While the server is running
npm install -g --prefix … @anthropic-ai/claude-code@latest(it downloads@anthropic-ai/claude-code-win32-x64, about 175 MB), close, reload, or update the desktop app that sent the request.
Expected behavior
The install either finishes on the server, or the provider is left as it was before the update, so claude keeps working.
Actual behavior
The disconnect interrupts the server.updateProvider request, and the interrupt kills the npm child in the middle of reify. Since #33975 the state ends as "Update stopped before it finished.", but npm never gets to roll back:
claude,claude.cmdandclaude.ps1in the npm prefix are left renamed to npm's retired names (.claude-XXXX,.claude.cmd-XXXX,.claude.ps1-XXXX).- The previous package is left at
node_modules\@anthropic-ai\.claude-code-XXXX;node_modules\@anthropic-ai\claude-codeholds the half-extracted new version, whosebin\claude.exeis the 500-byte placeholder. - The provider snapshot then reports
Claude Agent CLI (\claude`) was not found on PATH.`, and every new Claude session on that server fails until someone fixes the files by hand.
Impact
On that server the provider stops working, and the server is usually remote, so nobody is there to notice. The window is long on slow links: at ~240 KB/s the download alone takes over 10 minutes, and any client reload or desktop app update in that time triggers it. With Update everything, every machine waits for the slowest provider install before servers update, so a slow machine keeps the window open for the whole fleet.
Version or commit
Server 0.1.10-nightly.20261115.4749 (Windows x64), desktop 0.1.10-nightly.20261116.4800 (macOS arm64). Both are builds of a fork, but apps/server/src/provider/providerMaintenanceRunner.ts, apps/web/src/components/ProviderUpdatesAction.tsx and the Update everything files are identical to upstream v0.1.10-nightly.20261116.4800.
Environment
Windows 11 x64, Node v22.14.0, npm 11.14.1, Claude Code 2.1.323 → 2.1.326, HTTPS proxy in the server environment.
Logs or stack traces
Server trace, all spans of the one update:
ws.rpc.server.updateProvider 429417ms exit=Interrupted InterruptError: All fibers interrupted without error
ProviderMaintenanceRunner.runCommand 416606ms exit=Interrupted at ProviderMaintenanceRunner.runCommand (…)
ProviderMaintenanceRunner.collectCommandResult 416366ms exit=Interrupted
The npm debug log for that install has no exit line; its last entries are:
65 http cache @anthropic-ai/claude-code-win32-x64@…/claude-code-win32-x64-2.1.326.tgz 0ms (cache hit)
67 silly tarball no local data for @anthropic-ai/claude-code-win32-x64@… Extracting by manifest.
69 http fetch GET 200 https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.326.tgz 562ms (cache miss)
Workaround
Rename npm's retired copies back (move the half-installed claude-code aside first, then .claude-code-XXXX → claude-code and the three shims back to claude, claude.cmd, claude.ps1), then refresh providers.
Possible direction
#33975 notes that "whether updates should outlive their request is a separate question". This is the case where it matters: once the install command has started, let it run to completion in a server-scoped fiber and report through the provider update state clients already read, instead of tying the child process to the request.
Activity
juliusmarminge commentedon Nov 17, 2026
This is the same problem as #27361, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.
merge: 一键升级按机器流水,每台服务端只等自己的 provider