Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Workspace FocusNew to Visual Studio Code? Get it now.
Claude Workspace Focus

Claude Workspace Focus

untanya

| (0) | Free
Focus Claude Code (and other extensions that only look at the first folder) on the workspace folder you're actually working in, in a multi-root workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Workspace

Keep Claude Code (and any other extension that only looks at the first folder) focused on the project you're actually working in, inside a multi-root VSCode workspace.

The problem

If you open several projects in one VSCode window using a multi-root workspace (a .code-workspace file with multiple folders), Claude Code for VSCode only pays attention to the first folder in that list: session history, file context, everything. Switch to work on the second or third project in the same window, and Claude Code still behaves as if you're in the first one.

The usual workaround is one VSCode window per project, so each window's first (and only) folder is always the right one. That works, but it costs RAM for every extra window you keep open.

What it does

Right-click a folder in the Explorer and choose "Focus Claude Code Sessions Here". That folder moves to the front of the workspace, so Claude Code (and anything else that only looks at the first folder) is immediately focused on it. This reloads extensions and closes other open terminals: only the terminal for the newly-focused folder is left, either an existing one brought to the front, or a new one opened there if none exists.

Prefer the keyboard? Run "Claude Workspace: Focus Claude Code On…" from the Command Palette and pick the folder from the list instead.

If you run the Claude Code CLI directly in a terminal instead of the VSCode extension, keep in mind that switching focus closes that terminal, killing whatever claude session was running in it. This extension isn't a safe way to keep a long-running CLI session alive across a folder switch.

Install

Install it from the VS Code Marketplace: search for Claude Workspace Focus in the Extensions view, or open the Marketplace page. It updates automatically like any other extension.

From a .vsix

For editors that don't use the Microsoft Marketplace (VSCodium, for example), or to try a specific build:

  • Grab the .vsix from the GitLab Releases page.

  • Or build it yourself:

    pnpm install
    pnpm run package
    

Then in your editor: Command Palette → Extensions: Install from VSIX... → pick the claude-workspace-focus-*.vsix file.

Development

  • Package manager: pnpm (no npm/yarn).
  • pnpm check / pnpm format: lint and format (Biome).
  • pnpm typecheck: TypeScript, strict mode, no emit.
  • pnpm compile / pnpm watch: bundle src/extension.ts with esbuild.
  • pnpm test:unit: unit tests for the pure folder-reordering logic.
  • pnpm test: unit tests plus integration tests in a real Extension Development Host.
  • pnpm run package: build the .vsix.

See CLAUDE.md for the project's internal conventions.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft