[BUG] Claude Code is modifying the Bash PATH for VOLTA
Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Activity 7 comments · opened Jul 13, 2025 · closed Jul 17, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other
- Claude CLI version: 1.0.48
- Operating System: Ubuntu 24.04.1 LTS (Framework 13, 13th gen Intel)
- Terminal: bash
Bug Description
Claude Code modifies the PATH environment variable in a way that breaks volta's version management system. Instead of preserving ~/.volta/bin in PATH, Claude Code resolves it to specific versioned tool paths, preventing volta from dynamically managing Node.js versions and ignoring volta pin commands.
Steps to Reproduce
- Install Claude Code while volta was configured with Node 18.17.1
- Use Claude Code successfully with Node 18.17.1 (worked correctly at this time)
- Later upgrade volta to Node 20:
volta install node@20 - Verify volta configuration in regular terminal:
node --version(should show v20.19.3) - Verify volta shows Node 20 as active:
volta list - Check PATH in normal terminal:
echo $PATH(should contain~/.volta/bin) - Launch Claude Code from the same terminal session:
claude - Within Claude Code, check the PATH:
echo $PATH - Within Claude Code, check node version:
node --version - Try to use volta commands within Claude Code (e.g.,
volta list)
Expected Behavior
- Claude Code should preserve the original PATH with
~/.volta/bin - Volta commands should work within Claude Code
- Node version should match what volta has configured (20.19.3)
- NPM version should match volta configuration (10.8.2)
Actual Behavior
- Claude Code removes
~/.volta/binfrom PATH - Replaces it with hardcoded paths like
~/.volta/tools/image/node/18.17.1/bin(the old version) - Volta commands don't work since volta isn't in PATH
- Wrong Node version is used (18.17.1 instead of configured 20.19.3)
- PATH gets modified to show specific tool versions instead of letting volta manage them
- Claude Code appears to be caching the old volta configuration from when it was first used
Additional Context
- Volta version: 1.1.1
- Issue persists across multiple terminal sessions and Claude Code instances
- Volta works perfectly in all other environments (regular bash, other tools)
- Problem occurs even when using
volta pinin project configuration files - Both regular bash PATH and Claude Code PATH were tested from the same terminal session
- This breaks volta's core functionality and can cause unpredictable behavior when code depends on specific Node.js versions
7 Comments
Interesting I am also able to replicate this with
mise.Environment
This is the same with ruby and node
This messed up my python setup also, expected to have my .venv used, for pyright and pytest
I have a different env setup per project, some use conda and some .venv
I work with multiple python worktrees, each with their own .venv which I activate before launching Claude Code, but they're not respected. I'm forced to downgrade the version until this is resolved.
I believe I could be seeing a similar PATH issue here but with nixos environments. Mine worked at version 1.0.45 https://github.com/anthropics/claude-code/issues/3456
1.0.53 seems to have fixed these path issues for me (albeit for mise)
Ok I think these issues (and the problems caused by the attempted fix) should be cleared up in 1.0.55. Please let me know if you continue to have problems.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.