[FEATURE] VS Code extension: support custom working directory (cwd) different from workspace root

Resolved 💬 2 comments Opened Jun 26, 2026 by katomanz Closed Jun 29, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Feature Request

Summary

Add a VS Code extension setting to configure a custom working directory (cwd) for Claude Code, independent of the VS Code workspace root.

Use Case

A common workflow is to open a parent directory (e.g. /work/) containing multiple projects, while wanting Claude Code to operate within a specific subdirectory (e.g. /work/project-a/).

Currently the extension always uses the workspace root with no way to override this.

Proposed Solution

Add a setting such as:
{
"claude.workingDirectory": "./HOJ/OSV_Dev"
}
Supporting relative paths (from workspace root), absolute paths, and per-workspace config via .vscode/settings.json.

Current Workarounds

  • Open VS Code at the target subdirectory in a new window
  • Use the CLI (cd subdirectory && claude) in the integrated terminal

Both workarounds break the multi-project overview that makes opening a parent directory useful.

Why This Matters

Monorepos and multi-project workspaces are common. Developers often want to keep the full directory tree visible while scoping Claude Code's context to a specific project.

Proposed Solution

Add a setting such as:
{
"claude.workingDirectory": "./HOJ/OSV_Dev"
}
Supporting relative paths (from workspace root), absolute paths, and per-workspace config via .vscode/settings.json.

Alternative Solutions

  • Open VS Code at the target subdirectory in a new window
  • Use the CLI (cd subdirectory && claude) in the integrated terminal

Both workarounds break the multi-project overview that makes opening a parent directory useful.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

Use Case

A common workflow is to open a parent directory containing multiple projects in VS Code, while wanting Claude Code to operate within a specific subdirectory.

Example scenarios:

  1. Monorepo: Workspace is opened at /repo/ which contains apps/web/, apps/api/, packages/ui/. Developer wants Claude Code scoped to apps/api/ while keeping the full tree visible in the file explorer.
  1. Multi-project workspace: Opened at /work/ with project-a/, project-b/, project-c/. Switching between projects without opening new VS Code windows.
  1. Nested project structure: A parent directory holds both documentation and source code (/work/docs/, /work/src/). Claude Code should operate in /work/src/ only, to avoid polluting context with unrelated docs.

Currently the extension always uses the workspace root with no way to override this.

Additional Context

Monorepos and multi-project workspaces are common. Developers often want to keep the full directory tree visible while scoping Claude Code's context to a specific project.

View original on GitHub ↗

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