[BUG] CLAUDE_CONFIG_DIR doesn't completely isolate installations
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?
I've got a Claude Code account via API for work and then my own personal account. I want to keep them separate since my own projects shouldn't consume tokens on my work account and vice versa.
To do this I've setup an alias:
alias claudio="CLAUDE_CONFIG_DIR=~/.claude-work claude"
And then use this exclusively for work related projects (and regular claude for personal projects). However, these environments are not completely isolated and I find that there are some directories still shared or don't work for both.
For example:
-
~/.local/state/claude/ - IDE extension can only connect to my main claude and not when I use the alias and try do
/ide. - Memory location (although this might've been changed recently?)
What Should Happen?
Using a different config directory should isolate that instance of Claude and allow for running two different setups without risk of information and config being shared.
Error Messages/Logs
N/A
Steps to Reproduce
- Create an alias with a different CLAUDE_CONFIG value
- Run a couple different commands, see that memory is being set to user directory and not isolated config using
/status. - Try connect
/idefrom your aliased config, note that it fails.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
No response