[BUG] Cluade code ignores XDG Base Directory specification
Resolved 💬 7 comments Opened Nov 17, 2025 by untainsYD Closed Feb 28, 2026
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?
Claude creates .claude artefacts in the user's home directory instead of following the XDG Base Directory specification on Linux.
<img width="1329" height="563" alt="Image" src="https://github.com/user-attachments/assets/2b041f07-33d3-4e20-99e0-1c8a44bbfc30" />
What Should Happen?
It should follow XDG Base Directory specification, creating artefacts in XDG_CONFIG_HOME or/and XDG_DATA_HOME directories.
See https://wiki.archlinux.org/title/XDG_Base_Directory#User_directories for more information.
Error Messages/Logs
Steps to Reproduce
Install VSCode claude-code extension and connect it to your account (initialize it).
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Claude Code Version
2.0.42
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗