[BUG] Claude Code is modifying the Bash PATH for VOLTA
Resolved 💬 7 comments Opened Jul 13, 2025 by pduggi-cf Closed Jul 17, 2025
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
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗