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

[BUG] Symlink support for slash commands broken again in v2.0.62 (Regression from #10573)

Open MarkShawn2020 opened this issue 1 month ago • 1 comments

Bug Description

Symlinked slash command files in .claude/commands/ are not being discovered in version 2.0.62. This is a regression of the issue fixed in #10573.

Reproduction Steps

➜  claude-code-research l ~/.claude/commands/t*.md
lrwxr-xr-x@ 1 mark  staff     8B 12月  9 17:09 /Users/mark/.claude/commands/t.md -> think.md
-rw-r--r--@ 1 mark  staff   892B 10月  7 00:51 /Users/mark/.claude/commands/think-hard.md
-rw-r--r--@ 1 mark  staff   1.0K 10月  7 00:51 /Users/mark/.claude/commands/think-harder.md
-rw-r--r--@ 1 mark  staff   1.2K 10月  7 00:51 /Users/mark/.claude/commands/think-ultra.md
-rw-rw----@ 1 mark  staff   718B 10月  7 00:51 /Users/mark/.claude/commands/think.md
lrwxr-xr-x@ 1 mark  staff    13B 12月  9 17:11 /Users/mark/.claude/commands/tt.md -> think-hard.md
lrwxr-xr-x@ 1 mark  staff    15B 12月  9 17:09 /Users/mark/.claude/commands/ttt.md -> think-harder.md
lrwxr-xr-x@ 1 mark  staff    14B 12月  9 17:09 /Users/mark/.claude/commands/tttt.md -> think-ultra.md


➜  claude-code-research npm install -g @anthropic-ai/[email protected]

added 13 packages, and changed 3 packages in 657ms

15 packages are looking for funding
  run `npm fund` for details


➜  claude-code-research claude -p --output-format stream-json --verbose "/tt say 1" | jq 'select(.slash_commands) | .slash_commands | map(select(test("^t")))'
Path /Users/mark/.gemini was not found.
[
  "think-ultra",
  "tt",
  "think",
  "think-harder",
  "tttt",
  "t",
  "ttt",
  "think-hard"
]


➜  claude-code-research npm install -g @anthropic-ai/[email protected]

added 13 packages, and changed 3 packages in 667ms

15 packages are looking for funding
  run `npm fund` for details
➜  claude-code-research claude -p --output-format stream-json --verbose "/tt say 1" | jq 'select(.slash_commands) | .slash_commands | map(select(test("^t")))'
Path /Users/mark/.gemini was not found.
[
  "think-ultra",
  "think",
  "think-harder"
]

Expected Behavior

Symlinked .md files should be discovered like regular files.

Actual Behavior

Symlinked commands are not discovered or only partially discovered.

Environment

  • Claude Code version: 2.0.62
  • Last working version: 2.0.61
  • OS: macOS 15.5 (arm64)
  • Node.js: v22.20.0

Additional Context

This is a regression of #10573. Downgrading to 2.0.61 resolves the issue.

MarkShawn2020 avatar Dec 09 '25 09:12 MarkShawn2020

@MarkShawn2020 we're filtering out duplicates. Your example creates symlinks for the same commands. It sounds like what you really want is aliases for your slash commands?

amorriscode avatar Dec 09 '25 18:12 amorriscode

I observe the same behaviour. I'm on 2.0.73. I store my commands in separate repo and symlink them:

❯ ls -l .claude/commands/restack.md
lrwxrwxrwx - jumski 19 gru 07:52 .claude/commands/restack.md -> /home/jumski/Code/pgflow-dev/claude/source/.claude/commands/restack.md

I also gitignore bunch of claude files (so i can keep them symlinked):

❯ grep claude .gitignore
**/.claude/settings.local.json
# Claude config symlinks (actual content in ~/Code/pgflow-dev/claude/)
.claude/**/*
!.claude/.gitkeep

I'm pretty sure it was working on 2.0.71

The restack command is NOT available in autocomplete:

Image

But claude is aware of it:

Image

And refuses to invoke it:

Image

jumski avatar Dec 19 '25 07:12 jumski