Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When an agent cites a SvelteKit route file whose directory name contains literal [ and ] characters (dynamic segments), the clickable chat link percent-encodes those brackets. Clicking the link fails because the editor looks for a path that does not exist on disk.
Actual directory / file:
frontend/src/routes/crs/[crShortId]/edit/+page.svelte
Chat link is treated as:
frontend/src/routes/crs/%5BcrShortId%5D/edit/+page.svelte
The real folder is named [crShortId], not %5BcrShortId%5D.
This is related to the known Windows chat-link percent-encoding issues (%5C for backslashes), but specifically affects valid filesystem characters [ and ] used heavily by SvelteKit (and Next.js) for dynamic route folders.
Steps to Reproduce
- Open a SvelteKit project that has a route folder like
src/routes/crs/[crShortId]/edit/+page.svelte. - In Agent/Chat, ask something that causes the agent to link that file (for example: cite or open the edit page).
- Click the file link in the chat response.
- Observe that the path becomes HTML/URI-encoded with
%5B/%5Dand the editor cannot resolve the file.
Expected Behavior
The editor should open the real filesystem path with literal brackets:
frontend/src/routes/crs/[crShortId]/edit/+page.svelte
Chat file links should not percent-encode [ / ] when those characters are part of a valid directory name.
Operating System
Windows 10/11
Version Information
Cursor IDE (Windows)
OS: Windows 10.0.26200
Please note: exact Cursor build from Help > About Cursor can be pasted here if needed for triage. Reproduced in current Cursor Agent chat when linking SvelteKit [param] route files.
For AI issues: which model did you use?
Grok 4.5 (Agent / Chat)
Additional Information
Workaround: Ctrl+P (Go to File) and type the path with literal brackets, or open from Explorer.
Related known reports focus on Windows %5C encoding of backslashes in chat links; this report is specifically about [ / ] in SvelteKit dynamic route folder names becoming %5B / %5D.
Does this stop you from using Cursor
No - Cursor works, but with this issue