VSCode extension: markdown file links don't resolve for secondary workspace folders in multi-root workspaces
Summary
When a VSCode session has multiple workspace folders open (multi-root workspace), the Claude Code extension only resolves markdown file links against the primary workspace root (the folder it was launched from). Links to files in any additional workspace folder silently fail — clicking them does nothing.
Steps to reproduce
- Open VS Code with two folders as a multi-root workspace, e.g.:
- Primary:
c:\Projects\app-A - Secondary:
c:\Projects\app-B
- In a Claude Code chat, ask about a file that lives in
app-B. - Claude responds with a markdown link such as
[MyService.cs](c:/Projects/app-B/src/MyService.cs)or a relative path. - Click the link.
Expected: The file opens in the editor.
Actual: Nothing happens.
Root cause (observed)
The extension appears to anchor link resolution to the primary workspace root only. Secondary workspace folders are known to the extension (they are listed in the injected system context as "additional working directories"), but that information is not used when resolving markdown links.
Impact
Any multi-root workspace setup (common when working across related microservices or a caller app + its API) renders file links useless for the non-primary folders. The workaround is to show absolute plain-text paths and ask the user to open them manually via Ctrl+P or code -g, which is a poor experience.
Suggested fix
When resolving a markdown link, try each open workspace root in turn until the file is found, rather than stopping at the first (primary) root.
🤖 Generated with Claude Code