[BUG] Markdown file links with spaces in path are not clickable in VSCode 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?
Description:
When Claude outputs a markdown link [text](path) referencing a file whose path contains a space (e.g. Database/dbo/Stored Procedures/dbo.GetFields.sql), the link is not clickable in the chat panel.
Tried (all fail to produce a clickable link):
Unescaped space: [x](folder/Stored Procedures/file.sql)
URL-encoded: [x](folder/Stored%20Procedures/file.sql)
CommonMark angle-wrapped: [x](<folder/Stored Procedures/file.sql>)
Backslash-escaped space: [x](folder/Stored\ Procedures/file.sql)
file:/// absolute URI with %20
vscode://file/... URI with %20
- for space
Paths without spaces work correctly. The system prompt instructs the model to emit relative-path markdown links, which breaks for any workspace containing folders with spaces (very common on Windows, e.g. SSDT's Stored Procedures, Unit Tests).
What Should Happen?
Expected: Links with spaces (or a documented encoding of them) should resolve and open the file in the editor.
Error Messages/Logs
Steps to Reproduce
Ask Claude to show a link to any file in project with spaces in the path
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.112 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗