[Bug] Commands in child directories not discovered in multi-repo workspaces

Resolved 💬 3 comments Opened Mar 18, 2026 by adi-tonkean Closed Mar 22, 2026

Bug Description

Claude Code: Commands/Skills Not Discovered from Child Directories in Multi-Repo Workspaces

Summary

When working from a parent directory that contains multiple repos, Claude Code only discovers .claude/commands/ from the root working directory. Commands defined in child repo directories (e.g., repo-a/.claude/commands/) are invisible — they don't appear as slash commands and can't be invoked.

This makes per-repo commands/skills unusable in multi-repo workspaces, which is a common setup for monorepos and organizations with multiple related repositories.

Reproduction

Setup

workspace/                          # ← working directory
├── .claude/
│   └── commands/
│       └── global-cmd.md           # ✅ visible as /global-cmd
├── repo-a/
│   └── .claude/
│       └── commands/
│           └── repo-a-cmd.md       # ❌ NOT visible as /repo-a-cmd
├── repo-b/
│   └── .claude/
│       └── commands/
│           └── repo-b-cmd.md       # ❌ NOT visible as /repo-b-cmd
└── CLAUDE.md

What happens

  • /global-cmd works fine — it's in the root .claude/commands/
  • /repo-a-cmd and /repo-b-cmd don't exist — Claude Code never looks in child directories
  • The user has no way to make repo-specific commands discoverable without copying them all to the root

What should happen

Claude Code should recursively discover commands from .claude/commands/ in child directories, or at minimum from directories listed in the root CLAUDE.md as known repos.

Impact

  • Per-repo workflows are invisible: Each repo may have its own workflow commands (e.g., task management, testing, deployment). These can't be invoked from the parent directory.
  • No scalable workaround: Copying all child commands to root doesn't scale — it creates duplication, drift, and confusion about which repo a command belongs to.
  • Claude forgets to follow undiscoverable workflows: When commands aren't invocable, Claude consistently fails to read and follow them manually, even with explicit memory entries and CLAUDE.md instructions demanding it. This was documented in a separate bug report.
  • Forces single-repo working directory: Users are forced to cd into each repo to see its commands, losing the ability to work across repos from a single session.

Suggested Fix

Option A — Recursive discovery (preferred)

Discover .claude/commands/ and .claude/skills/ from all immediate child directories of the working directory. Namespace them in the slash command list (e.g., /repo-a/cmd-name or show the repo name as a prefix).

Option B — Configurable command paths

Allow CLAUDE.md or .claude/settings.json to specify additional command directories to scan:

{
  "commandPaths": [
    "repo-a/.claude/commands",
    "repo-b/.claude/commands"
  ]
}

Option C — Repo-local skills directory

Support a skills/ directory at the repo root (in addition to .claude/commands/) that gets automatically discovered when the repo is referenced in conversation or CLAUDE.md.

Environment

  • Claude Code CLI
  • Model: Claude Opus 4.6 (1M context)
  • Workspace: Parent directory containing 7+ repos, each with their own .claude/commands/

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.1.78
  • Feedback ID: e2ddf694-53aa-49dd-a543-a5be9d797b40

Errors

[{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:448:3940)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-18T12:17:03.507Z"},{"error":"Error: Request was aborted.\n    at LXT (/$bunfs/root/src/entrypoints/cli.js:1189:68515)\n    at next (native:1:11)\n    at h39 (/$bunfs/root/src/entrypoints/cli.js:6492:7182)\n    at next (native:1:11)\n    at y39 (/$bunfs/root/src/entrypoints/cli.js:6497:9173)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-18T12:26:57.299Z"},{"error":"Error: Request was aborted.\n    at LXT (/$bunfs/root/src/entrypoints/cli.js:1189:68515)\n    at next (native:1:11)\n    at h39 (/$bunfs/root/src/entrypoints/cli.js:6492:7182)\n    at next (native:1:11)\n    at y39 (/$bunfs/root/src/entrypoints/cli.js:6497:9173)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-18T12:27:32.016Z"},{"error":"Error: Request was aborted.\n    at LXT (/$bunfs/root/src/entrypoints/cli.js:1189:68515)\n    at next (native:1:11)\n    at h39 (/$bunfs/root/src/entr…

Note: Content was truncated.

View original on GitHub ↗

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