Slash command deduplication should favor project copy over user copy (and ideally let user choose)

Resolved 💬 3 comments Opened Apr 17, 2026 by baloo0402 Closed May 25, 2026

Summary

When a slash command exists in both ~/.claude/commands/ (user-level) and .claude/commands/ (project-level) with the same filename, Claude Code currently deduplicates and only shows the user copy in the autocomplete. This is the wrong priority, and the old behavior (showing both so the user can select) was better.

Expected Behavior

Option A (preferred UX): Show both entries in autocomplete, labeled User: and Project: respectively, so the user can select which version to run. This was the previous behavior.

Option B (minimum fix): If only one entry is shown, the project copy should take precedence over the user copy. Project-level customizations are intentional overrides; they exist precisely because the user wants different behavior in that project context. Silently running the user copy instead is the opposite of what's intended.

Current Behavior

Only the user copy is shown in autocomplete. The project copy is silently ignored. Users cannot invoke the project-specific version.

Motivation

The pattern of layered commands (user = generic base, project = project-specific extension) is a natural and useful workflow:

  • ~/.claude/commands/sync-worktree.md — generic version, available everywhere
  • .claude/commands/sync-worktree.md — project-specific override with additional context

With the current deduplication behavior favoring the user copy, the project override is unreachable via slash command, defeating its purpose.

Workaround

Renaming user-level commands with a personal suffix (e.g., sync-worktree-rss.md) to avoid the naming conflict entirely — but this is friction that shouldn't be necessary.

Environment

  • Claude Code CLI (WSL2 / Linux)
  • Observed after a recent update; the old behavior showed both User: and Project: labeled entries

View original on GitHub ↗

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