[BUG] Claude Edits Shell RC file on startup
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.81
- Operating System: Ubuntu 24.04
- Terminal: Terminal
Bug Description
I had a custom node_modules location aliased in my shell's RC file, upon starting claude, it would remove that alias entirely, not replacing it with anything.
Running claude migrate-installer did the "right" thing and installed it in ~/.local/claude, and then edited that alias into my RC file, but it's a little concerning that the process is editing anything outside of the local directory without being explicit about it. It's a little concerning that an AI tool would edit anything that I'm not explicitly allowing it to.
Steps to Reproduce
- Install claude in non-standard location using
npm install - Set alias in shell's RC file to that nonstandard location
- Run claude - see that custom alias has been removed from RC file.
Expected Behavior
Claude not editing a file outside of the directory it is running in or any local caches it uses.
Actual Behavior
Claude removes custom Alias
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗