Skip to content

Claude Code only recognizes the first folder in a VS Code multi-root workspace #30771

Description

@aeadedoyin

When opening a .code-workspace file with multiple folders, Claude Code only sets the first folder as the primary working directory and has no awareness of the other folders in the workspace.

Steps to reproduce

  1. Create a .code-workspace file with two folders:
{
  "folders": [
    { "path": "project-a" },
    { "path": "project-b" }
  ]
}
  1. Open the workspace in VS Code
  2. Start a Claude Code conversation
  3. Ask "what projects are in this workspace?"

Expected behavior

Claude Code should be aware of all folders in the workspace and list them in its environment context.

Actual behavior

Only the first folder (project-a) is recognized as the primary working directory. Claude has no context about project-b and must manually discover it.

Downstream impact

  • Project-scoped memory is only created for the first folder, not shared across the workspace
  • Claude defaults to only answering about the first project unless explicitly corrected
  • CLAUDE.md files in other workspace folders may not be loaded

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:idebugSomething isn't workingplatform:vscodeIssue specifically occurs in VS Code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions