[BUG] In-session /add-dir accepts only one path; launch --add-dir is variadic — inconsistent arity for the same command

Open 💬 0 comments Opened Jun 29, 2026 by brian-deane-gusto

Describe the bug

The --add-dir and /add-dir surfaces of the same feature have inconsistent arity. At launch, --add-dir is variadic and accepts multiple paths in one invocation (--add-dir <directories...>, per claude --help). The in-session /add-dir slash command does not match this — it adds a single directory per invocation, with no way to pass several at once.

Same command name, same purpose (grant tool access to additional directories), divergent behavior depending only on whether you're at launch or mid-session. Adding five sibling repos after a session has started means running /add-dir five times, even though the launch flag would have taken all five in one shot.

Steps to reproduce

  1. Launch with multiple dirs in one flag — works: claude --add-dir /path/a /path/b /path/c.
  2. Start a session normally, then mid-session run /add-dir /path/a /path/b /path/c.
  3. Observe that the in-session command does not add all three the way the launch flag does — only a single directory is taken per invocation.

Expected behavior

In-session /add-dir should accept multiple paths in one invocation, matching the variadic --add-dir launch flag: /add-dir /path/a /path/b /path/c.

Actual behavior

/add-dir takes one directory per invocation; there is no documented way to pass several. The only mid-session route to add N directories is N separate /add-dir calls (or restarting the session with --add-dir, which defeats doing it mid-session).

Environment

  • Claude Code version: 2.1.195
  • Platform: macOS (Darwin 25.5.0)

Notes / related

  • permissions.additionalDirectories and the --add-dir launch flag both pre-load directories before a session starts; neither addresses adding directories after a session is already running, which is when you often discover which sibling repos you need. (This is why #3146 — "configure additional directories via settings files," shipped as permissions.additionalDirectories — does not cover this; it's a different, launch-time mechanism.)
  • Separately, there's recurring demand for named, reusable directory bundles loadable in one command (e.g. /add-dir @my-bundle) — a feature, not this bug. See #24980 (closed NOT_PLANNED) and #45643 (closed as duplicate).
  • Prior report of the in-session multi-path gap: #68845 (auto-closed as a duplicate of the shipped/launch-time #3146; reopen not available to external reporters). Filing fresh and scoped to the arity inconsistency.

🤖 Generated with Claude Code

View original on GitHub ↗