claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Docs about user config directory `~/.claude` appear to contradict actual CLI app behavior

Open joshuadavidthomas opened this issue 6 months ago • 14 comments

Bug Description Claude Code seems to no longer be reading from the ~/.claude directory? All of my custom commands are gone and the CLAUDE.md file within that directory is not in the context.

Environment Info

  • Platform: linux
  • Terminal: ghostty
  • Version: 1.0.29
  • Feedback ID: fbdaa17e-c904-4efb-99c1-9b116a081980

Errors

[]

EDIT: It appears the location of the user config directory has changed from ~/.claude to ~/.config/claude in a recent update. I say appears, because there is no mention of the change either in the official docs or the CHANGELOG.

joshuadavidthomas avatar Jun 18 '25 22:06 joshuadavidthomas

Confirmed this was broken in @1.0.28

For those of you who might be struggling to get your environment to work try the following:

npx @anthropic-ai/[email protected]

@joshuadavidthomas hope this works for you too!

ktnyt avatar Jun 19 '25 01:06 ktnyt

Hi! We recently got rid of the /user: and /project: prefixes. Your commands should still be available. eg.

$ cat ~/.claude/commands/abc.md
a test command

$ claude
> /abc  # before: /user:abc

Can folks confirm this works ok? Docs incoming.

bcherny avatar Jun 19 '25 05:06 bcherny

No, nothing is being loaded from ~/.claude/, not user commands and /status isn’t showing ~/.claude/CLAUDE.md as being loaded. 1.0.27 has the removal of the prefix that you’re referencing and works ok. 1.0.28 and 1.0.29 are broken for me.

Hi! We recently got rid of the /user: and /project: prefixes. Your commands should still be available. eg.

$ cat ~/.claude/commands/abc.md a test command

$ claude

/abc # before: /user:abc Can folks confirm this works ok? Docs incoming.

johnhampton avatar Jun 19 '25 05:06 johnhampton

@joshuadavidthomas @johnhampton ~This (at least the bit where ~/.claude was not being read afaict) seems to be fixed in 1.0.30 fyi!~

@bcherny I believe there were several aspects to the issue here but the trouble I was experiencing seems to be fixed. Thanks to the team behind Claude Code it really is a great product.

Update: it seems claude code now reads ~/.config/claude instead of ~/.claude my apologies for the confusion.

ktnyt avatar Jun 20 '25 00:06 ktnyt

@joshuadavidthomas @johnhampton ~This (at least the bit where ~/.claude was not being read afaict) seems to be fixed in 1.0.30 fyi!~

@bcherny I believe there were several aspects to the issue here but the trouble I was experiencing seems to be fixed. Thanks to the team behind Claude Code it really is a great product.

Update: it seems claude code now reads ~/.config/claude instead of ~/.claude my apologies for the confusion.

Not sure if you're talking about several aspects in regard to my original issue or yours, but to be clear there's only one aspect to mine. Before I updated, I had a bunch of custom commands and a CLAUDE.md in the place the docs said to put my personal user config ~/.claude and everything was working fine. After updating they seemed to no longer be visible to the application. That's it.

If they've decided to move the folder the standard XDG location under the ~/.config directory, that's fine I suppose. It's pretty disappointing though the lack of communication or the simple act of keeping the docs up to date with the actual behavior of the application. The official docs still list ~/.claude directory as the location to put user settings.

joshuadavidthomas avatar Jun 20 '25 02:06 joshuadavidthomas

I moved ~/.claude to ~/.config/claude and my user slash commands were accessible and my user CLAUDE.md was loaded. But as @joshuadavidthomas noted, the docs still indicate that ~/.claude is the correct location for these files.

johnhampton avatar Jun 20 '25 03:06 johnhampton

I moved ~/.claude to ~/.config/claude and my user slash commands were accessible and my user CLAUDE.md was loaded. But as @joshuadavidthomas noted, the docs still indicate that ~/.claude is the correct location for these files.

Excellent! thank you.

raw1z avatar Jun 20 '25 08:06 raw1z

Edited the issue title and body with a more accurate description.

joshuadavidthomas avatar Jun 20 '25 14:06 joshuadavidthomas

If this is intentional, this is a pretty poor handling of it. Introducing a breaking change in a patch version update with no documentation updates or deprecation warning.. why even use SemVer at that point? Just switch to CalVer or, hell, just a single incrementing v1, v2, v3 versioning scheme.

joshuadavidthomas avatar Jun 20 '25 14:06 joshuadavidthomas

For me neither keeping commands under ~/.claude/commands/foo.md nor ~/.config/claude/commands/foo.md work

version: 1.0.31 (Claude Code)

I2olanD avatar Jun 23 '25 08:06 I2olanD

Been having this issue for a week. Seems bizarre that Anthropic haven't updated their official docs about it.

zazer0 avatar Jun 23 '25 12:06 zazer0

Setting CLAUDE_CONFIG_DIR=$HOME/.claude in my shell seems to return the old behavior. I ended up adding this as a fish alias:

alias claude="env CLAUDE_CONFIG_DIR=$HOME/.claude $HOME/.claude/local/claude"

joshuadavidthomas avatar Jun 23 '25 21:06 joshuadavidthomas

And it breaks again without warning. Now the commands in ~/.config/claude/commands stopped showing up. I can't get it to work from either directory ~/.config/claude/commands/ or `~/.claude/commands/.

EDIT: @joshuadavidthomas solution of exporting config using CLAUDE_CONFIG_DIR env var worked for me.

shashanktomar avatar Jun 24 '25 22:06 shashanktomar

Ah, looks like this issue has been bubbling as issue for a while! #1455 was opened a month ago and seems related to this issue (as well as many others).

Frustrating because out of all the agentic CLI tools, Claude Code is clearly the best at the moment, but the actual software development practices around it feel lacking (misuse of SemVer, confusing/misleading/potentially-out-of-date docs, inconsistently updated and incomplete CHANGELOG, etc.). Sorry to the devs behind the tool for that blunt assessment, but well, it's how I feel. 🤷‍♂️

joshuadavidthomas avatar Jun 25 '25 14:06 joshuadavidthomas

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 17 '25 14:08 github-actions[bot]