Respect XDG_CONFIG_HOME for config directory
Problem
Claude Code hardcodes ~/.claude as its configuration directory. It does not respect XDG_CONFIG_HOME, which is the standard mechanism on Unix systems for relocating config files out of $HOME.
A CLAUDE_CONFIG_DIR env var exists as an override, but this is a Claude-specific variable that users have to discover and set separately. Applications that follow the XDG Base Directory specification should default to $XDG_CONFIG_HOME/claude when XDG_CONFIG_HOME is set, and fall back to ~/.config/claude (or ~/.claude) when it is not.
Expected behavior
If XDG_CONFIG_HOME is set, Claude Code should use $XDG_CONFIG_HOME/claude as its default config directory (unless CLAUDE_CONFIG_DIR explicitly overrides it).
Reference
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗