Clickable file links broken when path contains square brackets

Resolved 💬 3 comments Opened Mar 22, 2026 by raitrax Closed May 26, 2026

Problem

In the VSCode extension, markdown file links are not clickable when the file path contains square brackets [ ].

This is a common case for FiveM server projects, where resources are organized in folders like [reroll], [tila], [lib], etc. — this is a standard FiveM convention, not something users can reasonably change.

Reproduction

In a workspace where files are inside bracket-named folders, none of these link formats work:

[job.lua](resources/[reroll]/reroll_libs/shared/job/job.lua)        <!-- raw -->
[job.lua](resources/\[reroll\]/reroll_libs/shared/job/job.lua)      <!-- backslash escape -->
[job.lua](resources/%5Breroll%5D/reroll_libs/shared/job/job.lua)    <!-- URL encoding -->
[job.lua](file:///f:/FXServer/tx-data/resources/%5Breroll%5D/...)   <!-- file:// + encoding -->

A link to a file without brackets in the path works fine:

[CLAUDE.md](CLAUDE.md)  <!-- ✅ works -->

Root cause

Square brackets are markdown link syntax characters ([text](url)). The markdown renderer in the VSCode chat panel interprets [reroll] inside the URL as a nested link instead of a literal folder name. None of the standard escaping methods (backslash, URL encoding) are handled.

Expected behavior

At least one escaping method (URL encoding %5B%5D or backslash \[\]) should produce a working clickable link to the file.

Environment

  • VSCode on Windows 11
  • Claude Code extension
  • Workspace with FiveM folder convention: resources/[category]/resource-name/

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗