Bug: Claude suggests wrong global config directory (~/.config/claude-code/ instead of ~/.claude/)
Bug: Claude suggests wrong global config directory (~/.config/claude-code/ instead of ~/.claude/)
Summary
When Claude Code agents are asked where to create global configuration files (commands, settings, etc.), they suggest ~/.config/claude-code/ instead of the documented location ~/.claude/.
Steps to Reproduce
- Ask Claude: "Create a global command that would work across all projects"
- Claude suggests placing files in
~/.config/claude-code/commands/ - Files placed there don't work because Claude Code doesn't load from that location
Expected Behavior
Claude should suggest ~/.claude/ as the global configuration directory, per the official documentation:
https://code.claude.com/docs/en/settings
The docs clearly state:
- Global settings:
~/.claude/settings.json - Custom agents:
~/.claude/agents/ - Global memory:
~/.claude/CLAUDE.md - Project commands work from:
~/.claude/commands/
Actual Behavior
Claude defaults to XDG Base Directory conventions and suggests ~/.config/claude-code/ as the global location, which:
- Doesn't match Claude Code's actual directory structure
- Isn't documented anywhere in official docs
- Causes commands/configs placed there to not work
Real-World Impact
In our conversation:
- A previous Claude session created
~/.config/claude-code/commands/generic-pr.md - The command didn't work because it wasn't in
~/.claude/commands/ - After moving to
~/.claude/commands/, it worked immediately - When asked where to put global config, Claude still suggested
~/.config/claude-code/
Root Cause
The agent appears to reason from first principles about Unix conventions (~/.config/ per XDG) rather than being aware of Claude Code's specific conventions (~/.claude/).
Suggested Fix
Claude Code agents should have explicit knowledge that:
- Global configuration location:
~/.claude/ - Global commands:
~/.claude/commands/ - Project-level commands:
.claude/commands/(in project root) ~/.config/claude-code/is NOT a valid location
Environment
- OS: macOS (Darwin 24.6.0)
- Claude Code version: 2.0.28
- Model: Claude Sonnet 4.5
Additional Context
This creates a self-perpetuating issue: Claude sessions create files in the wrong location, future Claude sessions find those files and assume the location is correct, reinforcing the wrong pattern.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗