Feature request: --project-dir flag (or session profile) to load .claude/ from a specific path regardless of working directory
Problem
When using the VS Code extension, the working directory is locked to the workspace root. Developers who keep a parent directory open (e.g. /projects/) to see all repos in the explorer have no way to load .claude/commands/ from a specific subdirectory repo without either:
- Changing the workspace root (losing visibility of other projects), or
- Symlinking commands into
~/.claude/commands/(causes namespace collisions across repos with same-named commands)
The same problem applies to the CLI when a developer prefers not to cd per session.
Proposed solution
A --project-dir flag on the CLI:
claude --project-dir /projects/my-repo
And an equivalent VS Code setting (workspace or folder-level):
"claude.projectDir": "/projects/my-repo"
This would make Claude Code load .claude/commands/, .claude/settings.json, and CLAUDE.md from the specified path while keeping the working directory unchanged.
Alternatives considered
- Symlink to
~/.claude/commands/— works but pollutes global namespace; same-named commands across repos conflict - Multi-root VS Code workspace — partial workaround but doesn't cleanly scope the active
.claude/to one root cdbefore starting — works for CLI only, not for the VS Code extension panel
Use case
Teams with a mono-repo-style parent workspace who want per-repo slash commands, settings, and CLAUDE.md context available from a fixed VS Code workspace without restructuring their editor layout.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗