Project commands don't override global commands (precedence reversed)

Resolved 💬 3 comments Opened Jan 4, 2026 by Stefan-Nitu Closed Jan 8, 2026

Description

According to the documentation, project commands (.claude/commands/) should take precedence over global/user commands (~/.claude/commands/). However, in practice, global commands take precedence over project commands.

From the docs:

If a project command and user command share the same name, the project command takes precedence and the user command is silently ignored.

Steps to Reproduce

  1. Create a global command:

``bash
mkdir -p ~/.claude/commands
echo "Global version of the command" > ~/.claude/commands/my-command.md
``

  1. Create a project command with the same name:

``bash
mkdir -p .claude/commands
echo "Project-specific version" > .claude/commands/my-command.md
``

  1. Run /my-command in the project

Expected Behavior

The project command should run: "Project-specific version"

Actual Behavior

The global command runs instead: "Global version of the command"

Environment

  • Restarted Claude Code multiple times
  • Tested in multiple projects
  • Both files confirmed to exist in correct locations

Workaround

Remove the global command so only project commands exist.

View original on GitHub ↗

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