-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Bug Report: Claude Code becomes unresponsive when launched in parent directory of ~/.claude
Summary
Claude Code starts successfully but becomes completely unresponsive to user interaction when launched in the parent directory of the ~/.claude configuration directory (e.g., launching in /home/username when config is at /home/username/.claude). The same installation works normally in all other directories.
Environment
- Claude Code Version: 2.1.31
- OS: Linux (Rocky Linux 8.9)
- Kernel: 4.18.0-513.11.1.el8_9.x86_64
- Shell: bash
Steps to Reproduce
- Have Claude Code installed with config directory at
~/.claude(e.g.,/home/username/.claude) - Navigate to the parent directory:
cd ~(e.g.,cd /home/username) - Launch Claude Code:
claude - Observe that Claude starts but does not accept any user input
Expected Behavior
Claude Code should work normally regardless of which directory it's launched from.
Actual Behavior
When launched from the parent directory of ~/.claude:
- Claude Code starts without error messages
- The interface appears normal
- User cannot interact with the CLI (no command input is accepted)
- The session appears frozen/unresponsive
Workaround
Launch Claude Code from any directory other than the parent directory of ~/.claude. For example:
cd ~/projects # or any other directory
claude # works normallyAdditional Context
Suspected root cause: When Claude Code is launched in the parent directory of its configuration directory, there may be a conflict or recursive dependency issue:
- The global config is at
/home/username/.claude - Launching in
/home/usernamecreates a project config named-home-username--claude - This may cause a configuration loop or access conflict
This appears to be a boundary condition bug that should be handled gracefully (either work normally or show a clear error message).
Related Files/Directories
/home/username/
├── .claude/ # Global config directory
│ ├── projects/
│ │ └── -home-username--claude/ # Project config created when launching in /home/username
│ ├── settings.json
│ └── ...
Suggested Fix
Consider one of the following approaches:
- Detect this scenario and display a warning/error message
- Handle this edge case to work normally without conflicts
- Document this limitation in user-facing documentation