[BUG] Claude Edits Shell RC file on startup

Resolved 💬 3 comments Opened Aug 15, 2025 by dtardoin Closed Aug 15, 2025

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

  1. Install claude in non-standard location using npm install
  2. Set alias in shell's RC file to that nonstandard location
  3. 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. -->

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗