Preflight Checklist
What's Wrong?
The Claude Code VSCode extension has regressed in its handling of multi-root workspaces. Previously, opening a file from a different workspace folder would cause Claude Code to switch its working directory context to match that folder. This behavior no longer works in the latest extension version.
Current "Actual Behavior":
Claude Code sets its working directory to the first folder in the workspace instead of the folder containing the active file. The extension ignores which file is currently open and defaults to the first workspace folder
What Should Happen?
Claude Code's working directory should be set to the workspace folder containing the active file
(This is standard VSCode extension behavior using workspace.getWorkspaceFolder(uri) API)
Error Messages/Logs
Steps to Reproduce
- Open a multi-root VSCode workspace (.code-workspace file with multiple folders)
- Open a file from a project that is NOT the first folder in the explorer (e.g.,
void-driller/constants/worlds.js when log is the first folder)
- Start a new Claude Code session
- Ask Claude Code what directory it's working in
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.1 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Workaround:
- Drag to reorder the folders in the explorer to make the desired project the first in the list
Impact:
- Multi-root workspaces are a core VSCode feature
- This regression makes the extension unintuitive for developers working with multi-root setups
Preflight Checklist
What's Wrong?
The Claude Code VSCode extension has regressed in its handling of multi-root workspaces. Previously, opening a file from a different workspace folder would cause Claude Code to switch its working directory context to match that folder. This behavior no longer works in the latest extension version.
Current "Actual Behavior":
Claude Code sets its working directory to the first folder in the workspace instead of the folder containing the active file. The extension ignores which file is currently open and defaults to the first workspace folder
What Should Happen?
Claude Code's working directory should be set to the workspace folder containing the active file
Error Messages/Logs
Steps to Reproduce
void-driller/constants/worlds.jswhenlogis the first folder)Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.1 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Workaround:
Impact: