VSCode extension: chat links never open files whose path contains a space (no decoding/normalization in link handler)
Summary
In the VSCode extension's chat panel, markdown links in Claude's responses that target a local file never open if the path contains a space – in any form (raw, angle-bracketed, percent-encoded, relative, or file://). The only link form that opens at all is a markdown link whose target is a raw absolute path with no spaces. The handler appears to do no URL-decoding or path normalization before attempting to open the target.
This makes file links completely unusable for any workspace whose path contains spaces – notably anything under Google Drive (~/Library/CloudStorage/GoogleDrive-*/My Drive/...), where every file inherits a space in its path.
Environment
- macOS 26.5 (build 25F71), Apple Silicon
- VSCode 1.132.0
- Claude Code extension
anthropic.claude-code-2.1.226-darwin-arm64 - Claude Code CLI 2.1.179
- Workspace root (real case):
/Users/<user>/Library/CloudStorage/GoogleDrive-<email>/My Drive/[00] <Name>– contains spaces, square brackets, and@
Repro / test matrix
All tested by clicking links rendered in the chat panel, same session. Target files verified to exist.
Space-free path (/Users/<user>/Documents/GitHub/App/README.md):
| Link form | Result |
|---|---|
| [x](/Users/<user>/Documents/GitHub/App/README.md) (raw absolute) | OPENS |
| [x](file:///Users/<user>/Documents/GitHub/App/README.md) | fails |
| Plain path in backticks (Cmd+click) | not clickable |
Path containing a space – isolated test with a space as the ONLY special character (/private/tmp/.../scratchpad/link test/Link Test.md):
| Link form | Result |
|---|---|
| [x](</private/tmp/.../link test/Link Test.md>) (angle-bracketed, raw space) | fails |
| [x](/private/tmp/.../link%20test/Link%20Test.md) (percent-encoded) | fails |
Workspace files under Google Drive (spaces + [ ] + @ in path) – every form fails:
| Link form | Result |
|---|---|
| Workspace-relative, %20-encoded ([x](02%20Product/Note%20Name.md)) | fails |
| Workspace-relative with ./ prefix | fails |
| Bare relative in angle brackets, raw spaces | fails |
| Absolute raw in angle brackets | fails |
| Absolute percent-encoded (spaces, brackets, @, en dash all encoded) | fails |
| file:// URI, fully encoded | fails |
Expected
At minimum, percent-encoded targets should be decoded and opened; ideally angle-bracketed raw paths too (both are valid CommonMark/GFM link destinations). The extension's own system prompt instructs Claude to emit workspace-relative markdown links for file references, so on a spaces-in-path workspace the extension is instructing the model to produce links that its own renderer cannot open.
Notes
- "Fails" = click produces no visible action (no editor tab, no error toast).
- The space alone is sufficient to break it (isolated in the
/private/tmptest with no other special characters). - Terminal-side workaround in use: emitting an
open "<absolute path>"shell command instead of a link.
🤖 Report drafted with Claude Code after live in-session testing.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗