[BUG] Markdown file links in chat output do not open files when clicked (VS Code extension)
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?
Environment
OS: Windows 11 Enterprise (10.0.22631)
Editor: VS Code (Claude Code native extension)
Model: Claude Opus 4.7
Behavior
When Claude Code emits a markdown link to a file (e.g. [file.js:52](path/to/file.js#L52)), the link renders as a blue clickable element in the chat panel but clicking does nothing — the file does not open in the editor.
Workaround
Asking Claude to invoke the Read tool with limit: 1 on the file path produces a clickable reference that does open the file. That's the only working path so far.
Impact
Heavy: every "open this file" reference in a session requires the user to either copy-paste the path manually into Quick Open (Ctrl+P) or explicitly ask Claude to use the Read tool instead. Filenames with spaces or @ are doubly painful.
What Should Happen?
links to code files provided by claude code in the clode code window in Visual Studio for Code should open in Visual Studio for Code window.
Markdown file links emitted by Claude in chat should open the referenced file (and jump to the line anchor when present) on click, matching the documented behavior in the Claude Code system prompt's "Code References in Text" section.
Error Messages/Logs
Steps to Reproduce
Tested four link variants for the same target file, all clickable-but-non-functional:
Relative path with line anchor: [name](Tasker/src/.../file.js#L52)
Same with %40 for @ in filename: [name](Tasker/src/.../file%40onChange.js#L52)
Plain absolute Windows path: c:\ServiceNow\...\file.js:52
Absolute file:// URI: [name](file:///c:/ServiceNow/.../file.js)
None opened the file when clicked. No console error, no toast notification, no terminal output.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.153
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗