[BUG] Multi-root VS Code workspace resolves same-named project skills from arbitrary foreign roots

Status Open
Maintainer reply None cached
Activity 1 comment · opened Jul 27, 2026

Summary

In a VS Code multi-root workspace, same-named project skills can resolve from different additional workspace folders instead of the repository currently being worked in. The selected source is not stable across skill names, so a workflow command may silently run instructions from an unrelated project.

Reproduction

  1. Create a VS Code multi-root workspace with several repositories.
  2. Put project-local skills or commands with the same user-invoked names in at least two repositories (for example task-start, review, or task-done).
  3. Start Claude Code for one repository and invoke the colliding names.

Actual behavior

Different invocations can load same-named definitions from different foreign workspace roots. Matching the preferred on-disk skill format in the intended repository does not make selection deterministic after a new session.

This is dangerous when those skills orchestrate stateful work such as creating or removing worktrees, running repository-specific validation, or closing tasks: the user can be working in project A while executing project B lifecycle instructions.

Expected behavior

The explicitly active project root must win deterministically over any same-named project skill discovered through other workspace folders or --add-dir. A conflict must never silently select an arbitrary foreign definition.

Requested solution

  1. Document and enforce precedence: active project root > explicitly configured project root > additional directories.
  2. Provide an explicit project-root configuration for VS Code sessions (for example claudeCode.workingDirectory or a --project-dir session option), or a per-workspace skill precedence map.
  3. Expose diagnostics in /skills: every candidate full path, precedence tier, and the selected winner. When same-named project skills collide at the same tier, show a blocking error or an explicit selection prompt.

Related issues

  • #36949 (multi-root working-directory configuration)
  • #60213 (explicit project-directory or session-profile request)

This is distinct from generic working-directory selection: it is a non-deterministic resolution bug for identically named project skills across loaded roots.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗