[BUG] Claude Code loses authentication when I update configuration
Description
When I update Claude Code configuration files, the application not only resets/restarts but also clears my authentication, requiring me to re-authenticate from scratch. This disrupts my workflow significantly as I need to go through the entire authentication process every time I make a configuration change.
Expected Behavior
- Configuration updates should be applied without losing my authentication state
- I should remain authenticated across configuration changes
- At most, a simple restart should be required, not a full re-authentication
Actual Behavior
- Updating configuration causes Claude Code to exit/reset
- My authentication state is lost
- I must re-authenticate completely as if using Claude Code for the first time
Steps to Reproduce
- Authenticate and start using Claude Code normally
- Update configuration (via
/settingscommand or manually editing config files) - Claude Code exits and requires full re-authentication
Impact
This issue significantly disrupts my workflow, especially when I need to adjust configurations frequently. Having to re-authenticate repeatedly is time-consuming and frustrating.
Environment
- OS: Linux 6.6.87.1-microsoft-standard-WSL2
- Platform: linux
- Claude Code version: [Please add your version here]
Additional Context
The authentication tokens/session appear to be cleared when configuration changes are detected, which seems unintended. Authentication state should persist independently of configuration settings.
Which setting specifically are you changing in /settings which causes this?
In general editing the settings file risks leaving it in a broken state (it has to parse perfectly as json - including eg trailing commas in lists). When this happens Claude Code resets the settings file which loses auth atm.
okay the problem is that this is even happening now even when I didn't configure anything at all it just signs me out
has been happening to be. it has something to do with exiting and starting claude a lot.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.