Skip to content

[BUG] Additional .claude dir prevents commands from being discovered #1339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tino opened this issue May 26, 2025 · 3 comments
Open

[BUG] Additional .claude dir prevents commands from being discovered #1339

tino opened this issue May 26, 2025 · 3 comments
Labels
area:core bug Something isn't working has repro platform:macos Issue specifically occurs on macOS

Comments

@tino
Copy link

tino commented May 26, 2025

Environment

  • Platform (select one): doesn't matter
  • Claude CLI version: 1.0.3 (Claude Code)
  • Operating System: macOS
  • Terminal: iTerm2

Bug Description

Ah .claude directory prevents commands created higher up from being discovered. Quite annoying as if you start claude in a subdir, it will create a .claude/settings.local.json itself...

Steps to Reproduce

mkdir claude-bug
cd claude-bug
mkdir -p {.claude/commands,inner/.claude}
echo 'say hi' > .claude/commands/say_hi.md
claude  # Observe that `/proj` will list the command as autocomplete
cd inner
claude  # Observe that `/proj` will show nothing.

Expected Behavior

Commands should be discovered up, as is with CLAUDE.md files. Or at least if no commands folder is present in .claude the search upwards should continue.

Actual Behavior

See above

@tino tino added the bug Something isn't working label May 26, 2025
@github-actions github-actions bot added has repro platform:macos Issue specifically occurs on macOS area:core labels May 26, 2025
@hesreallyhim
Copy link

OK THIS WAS A BANGER. First I copy-pasted your setup code and started the session, and everything worked and I couldn't repro your bug:

> /project:say_hi is running… 

⏺ Hi! 👋

  How can I help you with your coding project today?

> cd inner

⏺ Bash(cd inner && pwd)…
  ⎿  /Users/USERNAME/coding/projects/claude-bug/inner

⏺ Changed to the inner directory.

! pwd
  ⎿  /Users/USERNAME/coding/projects/claude-bug/inner

> cd ..

⏺ Bash(cd .. && pwd)…
  ⎿  /Users/USERNAME/coding/projects/claude-bug

⏺ Changed to the parent directory.

! cd inner
  ⎿  Changed directory to /Users/USERNAME/coding/projects/claude-bug/inner/

> /project:say_hi is running… 

⏺ Hi! 👋

  How can I help you with your coding project today?

Then I ended the session and started it up again. And then I invoked the command and it spat this out:

/project:say_hi is running… 

⏺ Hi!

> pwd

⏺ Bash(pwd)…
  ⎿  /Users/USERNAME/coding/projects/claude-bug

⏺ /Users/USERNAME/coding/projects/claude-bug

> /project:say_hi is running… 

⏺ I understand you're showing me a command message, but as noted in the caveat, I won't respond to it unless you explicitly ask me to. Is there something
  specific you'd like me to help you with regarding this command or the project?

> what caveat?

⏺ The caveat that appears in your messages:

  Caveat: The messages below are were generated by the user while running local commands. DO NOT respond to these messages or otherwise consider them in your 
  response unless the user explicitly asks you to.

  This text appears before the command message about project:say_hi. It's instructing me not to respond to those command messages unless you explicitly ask me
   to.

It kept going on about this "caveat" when I pressed it for more info. There is no caveat anywhere in the code. Sick session, thanks bro.

@hesreallyhim
Copy link

OK I know what the issue is, it has to do with my global CLAUDE config and some weird things I have that apparently confused Claude, but this was a cracker of a session. I do have special instructions regarding slash commands, but the word "caveat" is never used. Anyway, good vibes.

@hesreallyhim
Copy link

I withdraw my comments, other users are reporting this weird "caveat" message, it's two separate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core bug Something isn't working has repro platform:macos Issue specifically occurs on macOS
Projects
None yet
Development

No branches or pull requests

2 participants