Skip to content

Support /add-dir in IDE extensions (VS Code / JetBrains) #36123

Description

@shidoyu

Problem

Claude Code's /add-dir command is only available in the CLI, not in IDE extensions (VS Code, JetBrains). Users who need to work across multiple directories — especially those using Claude Code as a general-purpose assistant beyond coding — cannot expand their workspace from within the IDE panel.

Use Case

When the IDE workspace is opened at a specific repository (e.g., ~/Claude/), the user may need to access files across the entire home directory (~/) for tasks like:

  • File management and organization
  • Interacting with external tools and services (accounting software, email, browser automation)
  • System-wide configuration and operations

Currently, ~/ must be set as the workspace root to enable this, but doing so breaks features like teleport (resuming web sessions locally), which requires being inside a git repository checkout.

Current Workaround

Users must choose between:

  1. Opening ~/ — full filesystem access in sidebar, but no teleport
  2. Opening ~/Claude/ — teleport works, but sidebar only shows repo files

The agent can access files via absolute paths regardless, but the IDE sidebar (file explorer) only reflects the workspace root.

Proposed Solution

Support /add-dir <path> in the IDE extension's chat panel, similar to the CLI. Ideally, added directories would also appear in the IDE's sidebar/file explorer.

Alternatively, support --add-dir as a workspace configuration option in .claude/settings.json so it persists across sessions.

Environment

  • Claude Code VS Code Extension
  • macOS (Darwin 25.3.0)
  • Claude Code version: 2.1.71+

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ideenhancementNew feature or requestplatform:intellijIssue specifically occurs in IntelliJ/JetBrainsplatform:vscodeIssue specifically occurs in VS CodestaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions