[BUG] Please stop using $HOME as a state store and adopt the standardised locations instead

Status Open
Reported on v2.1.267
Maintainer reply None cached
Activity 0 comments · opened Sep 10, 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 code writes its .claude.json variants to the users home directory.

Writing state or config files directly into a users home directory is considered poor practice for modern desktop applications.

Instead, cross-platform apps should dynamically check the user's operating system and follow native platform standards:

  • Linux / Unix: Follow the XDG Base Directory Specification. Default configuration files to $XDG_CONFIG_HOME/.claude which you already do.
  • macOS: Its recommended to use ~/Library/Application Support/claude/ (or ~/Library/Preferences/)
  • Windows: Use %APPDATA%\claude\config.json (which resolves to C:\Users\<User>\AppData\Roaming\claude\config.json).

Note, I have not verified the current situation on windows.

If this is configured via Node.js / TS: env-paths or xdg-app-paths will work

What Should Happen?

Follow best practises.

Steps to Reproduce

  1. Run claude
  2. ls ~/.claude.json

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.267

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗