[Bug]: cursor:// and vscode:// links in chat do nothing when clicked #16822
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- On macOS with Cursor installed, have an agent reply with a markdown link such as
[file.md line 186](cursor://file/Users/me/repo/file.md:186). - Click the link in the chat message.
Expected behavior#
Cursor opens file.md at line 186, as it does when the same link is clicked in a browser or a terminal.
Actual behavior#
Nothing happens: no app opens and no error is shown. The link is styled as a normal link. A vscode://file/... link behaves the same.
open "cursor://file/...:186" from a shell opens Cursor at the right line, so the OS handler works.
Related: #15722 adds an external-app allowlist (linear:, slack:, notion:, obsidian:) for the same root cause. This asks to add editor schemes (cursor:, vscode:, possibly zed:), or to document why they stay blocked. #16251 is the same symptom in the preview browser.
Impact#
Minor bug or occasional failure
Version or commit#
T3 Code (Nightly) 0.0.46-nightly.20261005.2702
Environment#
macOS 26.7.1, desktop app, Claude Code provider
Logs or stack traces#
_No response_
Screenshots, recordings, or supporting files#
No response
Workaround#
Use a plain absolute-path link, e.g. [file.md line 186](/Users/me/repo/file.md:186). It renders as a file chip, but it opens in T3's side panel, not in the editor at the line.
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
Same root cause for app schemes outside the editor set:
obsidian://here, andlinear://andslack://behave the same way.Repro
- Have an agent reply with
[note](obsidian://open?path=/Users/me/vault/note.md). - Click or cmd+click the link in the chat.
Expected: macOS hands the URL to Obsidian, as
open "obsidian://…"does from a terminal. Actual: nothing happens, and "Open in system browser" from the context menu does nothing either. A file link is no workaround, because file links open in the configured editor.Three checks on
main(7e289ae) block these links:ChatMarkdown.tsxmarkdownUrlTransformfalls back to react-markdown'sdefaultUrlTransform, which empties thehref, so the click handler returns on!href.onContextMenureturns early whenresolveExternalWebLinkHost(href)is null, so the chat's link menu is never built for non-web schemes.ElectronShell.parseSafeExternalUrlaccepts onlyhttp:/https:plus remote-editor deep links.
#15722 allowlisted
linear/slack/notion/obsidianin the renderer sanitizer and inElectronShell. It was closed for missing UI verification, and the closing comment asks for screenshots and a recording before reconsideration. One change could cover both that case and the editor schemes here. The configurable policy proposed in that thread would also cover private tools without a release per scheme. It has two parts: approved schemes in settings, and an "Open in app" confirmation for any other scheme, enforced in the main process.Environment: T3 Code Nightly desktop app 0.1.1-nightly.20261020.3411, macOS 26 (arm64). The triage CLI was 0.1.0.
Triage by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, via
t3 triage.- Have an agent reply with
Note
Written by Claude, on behalf of fadeenk
Update: the setting suggested below is proposed in the Ideas discussion #21233. If you want it, upvote it there.
Same root cause for
obsidian://, on Windows. Reproduced and traced in the installed build (T3 Code (Beta), server 0.1.2).Repro
- Have an agent reply with
[note](obsidian://open?vault=MyVault&file=Some%20Note). - Click the link in chat.
Expected: Obsidian opens the note. Actual: nothing happens and no error is shown. The same URL opened from PowerShell with
Start-Processopens the note, and theobsidianprotocol is registered toObsidian.exe, so the OS side is fine.Two layers both have to change
- Renderer: the sanitizer schema adds only
file,t3-citation,t3-contextand one other T3 scheme to the defaulthrefprotocols, so anobsidian:href is stripped before the click. - Desktop shell:
parseSafeExternalUrlpasses a URL toshell.openExternalonly if its protocol is inSAFE_WEB_PROTOCOLS(http:,https:) or it is a remote-editor URL (vscode-remote, zed-ssh, jetbrains gateway). Claude ran the extracted function:https://…passes andobsidian://…is rejected. So a fix to the sanitizer alone would still fail at this gate.
The right-click menu also offers no "Copy link" for these URLs, so there is no workaround from the chat.
Suggestion: a setting for extra allowed external link protocols, empty by default, shared by both layers. A hard-coded list like the one in #15722 (closed) would help, but custom schemes can launch local apps, so letting each user opt in seems safer. fadeenk would use this for
obsidian:; others in this thread wantcursor:andvscode:.Related: #21233 (Ideas discussion for this setting), #15722 (closed), #23486 (open, cursor/vscode only).
- Have an agent reply with
I can reproduce this with
discord://links in T3 Code desktop on Windows. The bundledt3CLI reports v0.1.6.Reproduction#
Have the agent reply with an explicit Markdown link, replacing the placeholders with a Discord server and channel/thread you can access:
[Open Discord](discord://-/channels/<server-id>/<channel-or-thread-id>)The text is styled like a link, but the cursor does not change to a hand pointer. Clicking or Ctrl-clicking does nothing, with no visible error.
Expected: open the installed Discord app at that channel/thread.
Confirmed comparisons#
- The exact same explicit Markdown link opens the correct thread directly in OpenChamber desktop on the same Windows machine.
- HTTPS deep links for eM Client open the correct email and conversation directly from T3 desktop.
- An HTTPS landing page that navigates to the same
discord://destination works when clicked from T3. This is a usable workaround, but leaves an extra browser tab open.
This adds Discord to the affected applications. I would appreciate the user-approved URL-scheme support proposed in https://github.com/pingdotgg/t3code/discussions/21233, so
discord:can be allowed without a separate web launcher or an app-specific patch.Posted with an AI assistant on my behalf; the click-through results above were manually tested by me.
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Thanks for the clear report. Triage:
Root cause (two layers both drop
cursor:/vscode:links):apps/web/src/components/ChatMarkdown.tsx:539-542only addsfile,t3-citationandt3-contextto the defaulthrefprotocols. The default schema doesn't includecursor:orvscode:, so the sanitizer strips those hrefs.parseSafeExternalUrlinapps/desktop/src/electron/ElectronShell.ts:17-50accepts onlyhttp:/https:plus remote editor links (vscode://vscode-remote/ssh-remote+…,zed://ssh/…, and the matching remote schemes for capable editors). A localcursor://file/…orvscode://file/…URL returnsnone, sodesktop:open-external(apps/desktop/src/ipc/methods/window.ts:313-320) never callsshell.openExternal, and nothing is shown to the user.This doesn't look like a deliberate block on editor schemes. Editor schemes already pass for remote links; local
filelinks just weren't covered.Proposed fix: extend #15722 (it adds a shared
EXTERNAL_APP_LINK_SCHEMESallowlist forlinear/slack/notion/obsidianin both the sanitizer andElectronShell). Add editor schemes there (cursor,vscode, possiblyvscode-insidersandzed), and inElectronShellkeep them as narrow as the remote checks (for example,host === "file"and no userinfo). A later option is to rewrite these links to open in the configured editor. #16251 is the same symptom in the preview browser and is tracked separately.Workaround: copy the link and run
open "cursor://file/…:LINE"from a shell, as you did.