[BUG] VS Code extension starts in an arbitrary workspace

Resolved 💬 3 comments Opened Sep 30, 2025 by moltar Closed Oct 4, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using VS Code extension, while VS Code is opened in "workspace" mode, Claude Code launches in the _first available_ workspace, not in the root of the repo.

E.g. if I have foo.code-workspace file with:

{
  "folders": [
    {
      "name": "first project",
      "path": "apps/first"
    },
    {
      "name": "workspace",
      "path": "."
    }
}

Then Claude Code will assume the project root is apps/first and will ignore anything from .claude/* dir that is _actually_ in the root of the repo.

What Should Happen?

Claude Code should identify project root correctly.

Error Messages/Logs

N/A

Steps to Reproduce

Already described above.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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