Slash commands from symlinked .claude/commands/ not discovered on Linux

Resolved 💬 4 comments Opened Mar 31, 2026 by agoncharovg Closed Apr 4, 2026

Description

Slash commands from .claude/commands/ are not discovered when .claude/commands is a symlink to another directory. This worked previously (as recently as yesterday) and works on macOS for other team members with the same setup and same Claude Code version.

Environment

  • Claude Code version: 2.1.88
  • OS: Ubuntu Linux 6.8.0-106-generic (x86_64)
  • Node.js: v20.19.4
  • Shell: zsh

Setup

Our team stores all AI config in ai/ directory and symlinks into .claude/:

.claude/commands -> ../ai/commands    (symlink to directory)
.claude/skills   -> ../ai/skills      (symlink to directory)
.claude/agents   -> ../ai/agents      (symlink to directory)
.claude/hooks    -> ../ai/hooks       (symlink to directory)
.claude/prompts  -> ../ai/prompts     (symlink to directory)

This allows each team member to have their own .claude/settings.local.json while sharing commands/skills/agents via ai/.

Observed behavior

  • Skills from .claude/skills/ ARE discovered (e.g. refactor-assert-message from .claude/skills/refactor-assert-message/SKILL.md appears in the skill list)
  • Commands from .claude/commands/*.md are NOT discovered — no custom slash commands appear in autocomplete when typing /
  • Built-in slash commands (/help, etc.) work fine
  • Files are readable through symlinks (verified with cat, ls, readlink -f)

What was tried

  1. Replacing symlink with real directory (rm .claude/commands && cp -r ai/commands .claude/commands) — did not help
  2. Adding symlinks to git index (git add .claude/commands) — did not help
  3. Removing .claude/ from .gitignore — did not help
  4. Restarting Claude Code session — did not help
  5. Creating a minimal test command with proper YAML frontmatter — did not help

Expected behavior

Slash commands from .claude/commands/*.md should be discovered on Linux, same as on macOS.

Notes

  • Same setup (symlinks, same Claude Code version 2.1.88) works on macOS for other team members
  • This was working on Linux until recently (broke sometime around 2026-03-30/31)
  • The issue may be related to how Node.js resolves symlinks on Linux (inotify vs FSEvents) or a recent change in the command discovery logic

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗