[BUG] SPB_DATA installation failure due to Cadence HOME environment variable
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?
Title: Native Windows installer splits binary and PATH from config when HOME is set (e.g. Cadence HOME=C:\SPB_Data) — claude not on PATH, misleading install Location, extension auth-status failure
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported (related but distinct: #21365, #42337, which cover PATH-not-added but not the
HOME/%USERPROFILE%split or its trigger) - [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's wrong
On Windows, when the HOME environment variable is set to something other than %USERPROFILE%, the native PowerShell installer resolves the home directory inconsistently:
- It installs the binary under
$HOME\.local\bin(HOME-based). - It reports the install Location as
%USERPROFILE%\.local\bin\claude.exe(USERPROFILE-based) — which is wrong, the binary is not there. - Its PATH warning names
$HOME\.local\bin(HOME-based) — correct, but neither path is added to PATH automatically. - Meanwhile the runtime correctly reads config/credentials from
%USERPROFILE%\.claude(per the docs), so$HOME\.claudeis created empty and unused.
Net result: claude is not found on PATH, the installer points the user at a Location that doesn't contain the binary, and — because the VS Code extension shells out to the claude binary to check auth status — login appears to "succeed" in the browser but the extension reports "Failed to retrieve auth status after login."
This is common on engineering workstations because Cadence's PCB suite (Allegro/OrCAD, the "SPB" tree) sets HOME=C:\SPB_Data system-wide, so any machine running Cadence hits this. Git for Windows and ssh have the same long-standing conflict with Cadence's HOME.
Environment
- OS: Windows 11 Enterprise, 25H2, OS build 26200.8655
- Claude Code: 2.1.195 (native PowerShell install via
irm https://claude.ai/install.ps1 | iex) echo $env:HOME→C:\SPB_Data(set by Cadence)echo $env:USERPROFILE→C:\Users\<user>
Expected behavior
The installer should resolve the home directory consistently on Windows, and should prefer %USERPROFILE% to match both the documentation and the runtime's ~/.claude resolution. At minimum:
- Install the binary and report the
Locationusing the same resolution (no mismatch between where it installs and what it prints). - Add the actual install directory to the user PATH automatically (or update the current session), per #21365 / #42337.
- When
HOMEand%USERPROFILE%diverge, surface an explicit warning that the two differ and state which one is being used, since this also affects where config vs. binary land.
Workaround (for anyone who finds this)
Add the HOME-based bin folder (where the binary actually is) to your user PATH and restart your terminal / VS Code:
[Environment]::SetEnvironmentVariable("PATH", [Environment]::GetEnvironmentVariable("PATH","User") + ";C:\SPB_Data\.local\bin", "User")
Credentials are already correct at %USERPROFILE%\.claude, so no re-login is needed once the binary is reachable. Background auto-updates continue to refresh the binary at the HOME-based path, so that PATH entry stays valid.
What Should Happen?
If Anthropic can make an installer which notices that HOME is taken by an app which is violating basic OS cleanliness and instead redirect/add its own environment variables so that these conflicts don't occur, that would be great. Otherwise this bug report acts as a log and a fix for others to find when they encounter the same problem. Note: I've probably filed this all wrong in the bug report form, I don't use Github regularly as a user and Claude built the above report for me. Sorry if I screwed anything up!
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
- On Windows, set
HOMEto a non-default path (or install Cadence, which does this):setx HOME C:\SPB_Data - Open a new PowerShell session, confirm
echo $env:HOMEdiffers fromecho $env:USERPROFILE. - Run
irm https://claude.ai/install.ps1 | iex. - Observe the installer output and run
claude --version.
Actual behavior
Installer output:
✔ Claude Code successfully installed!
Version: 2.1.195
Location: C:\Users<user>.local\bin\claude.exe <-- binary is NOT here
⚠ Setup notes:
● Native installation exists but C:\SPB_Data.local\bin is not in your PATH.
Verification:
Get-ChildItem C:\SPB_Data.local\bin
claude.exe (234,930,336 bytes) <-- actual binary, HOME-based
Get-ChildItem C:\SPB_Data.claude <-- empty, created but unused
Get-ChildItem C:\Users<user>.claude <-- populated: .credentials.json,
settings.json, sessions, projects, ide, ... runtime config, USERPROFILE-basedclaude --version → CommandNotFoundException (neither .local\bin is on PATH).
VS Code extension → "Failed to retrieve auth status after login" (can't run the binary to check status, even though %USERPROFILE%\.claude\.credentials.json was written).
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.195
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_