Description
What happened
An npm-installed Claude Code under ~/.local is classified as native. T3 selects claude update rather than npm maintenance when Claude is discovered through npm's own command symlink.
Diagnosis
Current main at 80a2351fcb909034e65a512dfabeb3cdfd367762 still contains the same detection order:
apps/server/src/provider/Drivers/ClaudeDriver.ts:75:isClaudeNativeCommandPathaccepts any path ending in/.local/bin/claudeor/.local/bin/claude.exe.packages/provider-core/src/server/maintenanceResolver.ts:466: a matching command path returns native maintenance beforeresolveNpmGlobalPrefixruns. There is a mise exception, but none for this npm-owned link.
Verified npm ownership should take precedence over a native-looking launcher path. This classification also risks directing an npm installation to the separate native update channel; no downgrade through the npm link was attempted.
Steps to reproduce
- Set npm's global prefix to
$HOME/.localand runnpm install -g @anthropic-ai/claude-code. - Confirm npm created
~/.local/bin/claude -> ../lib/node_modules/@anthropic-ai/claude-code/bin/claude.exeand package metadata exists there. - Let T3 discover Claude through PATH without a custom
binaryPath, then refresh the provider. - Observe the native maintenance command.
- Point
binaryPathdirectly at the executable inside the same npm package and refresh: maintenance changes to npm.
Version
Affected runtime version retained privately in triage context. Matching source logic verified on main at the commit above; source references do not imply an exact match to the running build.
Environment
npm global prefix ~/.local, with npm's standard command symlink. Personal system details omitted.
Evidence
Observed on the same installation; paths normalized:
PATH discovery:
updateCommand: <home>/.local/bin/claude update
canInstallVersion: false
Explicit executable inside the npm package:
updateCommand: npm install -g --prefix <home>/.local --allow-scripts=@anthropic-ai/claude-code @anthropic-ai/claude-code@latest
canInstallVersion: true
Both snapshots reported ready/current. T3's actual Update action returned succeeded / Already up to date. The demonstrated failure is maintenance selection, not a failed upgrade in these snapshots.
Related issues
#27942 covers native release-feed lag, rather than an npm install classified as native. #27339 covers mise wrappers, for which an exception already exists. Searches found no matching npm-link report.
Fix applied or workaround
Keep the standard npm installation and set config.binaryPath directly to the executable inside its npm package. T3 then selects npm maintenance. No T3 source changes were made.
Filed by
Codex (gpt-6.1-sol), following T3 triage using server.prepareTriage in the existing session.
Activity