[BUG] VSCode extension: chat file links not resolved across multi-root workspace folders (only primary root works)
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?
aIn the Claude Code VSCode extension, markdown file links produced by the assistant in the chat panel are not clickable/openable in a multi-root workspace, except when the path is relative to the primary (first) workspace root.
Workspace roots in this repro: c:\Athens\qbflibraries\qbf (primary), c:\Athens\qbflibraries\qbfdesign, c:\Athens\VendingService, and others. Subfolders such as qbfcodegen are not workspace roots themselves.
Chat links appear to be resolved only against the first (primary) workspace folder. As a result: files in other multi-root workspace folders (e.g. qbfdesign) are not linkable in any format, even when the path is relative to their own root; absolute paths and file:/// URIs are not supported; a relative path attempting to go above the primary root (../…) does not resolve either.
This is related to #72889 (file links in chat not navigating at all), but appears to be a more specific root cause affecting multi-root workspaces: the resolver seems hardcoded to only the first workspace folder.
What Should Happen?
aChat file links should resolve against ALL workspace folders in a multi-root workspace (like VSCode's native multi-root file resolution), not only the primary/first one. Ideally the extension should also accept absolute paths and file:/// URIs, or at least support a <workspaceFolderName>/<relativePath> disambiguation format so links to files in sibling roots (e.g. qbfdesign) are clickable and open the correct file.
Error Messages/Logs
Steps to Reproduce
a1. Open a multi-root VSCode workspace with at least two folders, e.g. root A = c:\Athens\qbflibraries\qbf (primary) and root B = c:\Athens\qbflibraries\qbfdesign (sibling, non-primary).
- Ask Claude Code to reference/generate markdown links to two existing files: one inside root A (e.g.
qbf\DBUpdater\frmDBtoDBU.pas) and one inside root B (e.g.qbfdesign\AppCmdLog\frmUpdateModificheDBU.pas). - 3. In the chat panel, try clicking on links generated in each of the following formats and note whether the file opens:
| Link format (href) | Target root | Result |
|---|---|---|
| DBUpdater/frmDBtoDBU.pas (relative to primary root qbf) | A (primary) | Works |
| qbf/DBUpdater/frmDBtoDBU.pas (relative to common parent qbflibraries) | A | Fails |
| c:/Athens/qbflibraries/qbf/DBUpdater/frmDBtoDBU.pas (absolute) | A | Fails |
| file:///c:/Athens/qbflibraries/qbf/DBUpdater/frmDBtoDBU.pas (file URI) | A | Fails |
| AppCmdLog/frmUpdateModificheDBU.pas (relative to qbfdesign root) | B (sibling) | Fails |
| qbfdesign/AppCmdLog/frmUpdateModificheDBU.pas | B | Fails |
| c:/Athens/qbflibraries/qbfdesign/AppCmdLog/frmUpdateModificheDBU.pas (absolute) | B | Fails |
Only the first row (path relative to the primary workspace root) works; every other format fails, including plain relative paths within the sibling root B.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.216 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Related to #72889 (general report that chat file links look clickable but never navigate/open anywhere). Duplicate/related: #67565, which described this exact multi-root symptom and root cause, but was auto-closed as stale ("not planned") without a fix being shipped — reopening the topic here with a more complete repro (7 different link formats tested) since the underlying problem still appears to be present.
Note: account is on a Claude Code Max subscription (login via claude.ai, not a raw Anthropic API key) — selected "Anthropic API" above as the closest match since Bedrock/Vertex don't apply.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗