Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: cursor:// and vscode:// links in chat do nothing when clicked #16822

Closeddylankilkenny(GitHub profile, opens in a new tab) opened this issue 4 comments

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

  1. 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).
  2. 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.

  1. Note

    Grok responding on behalf of Julius.

    Thanks for the clear report. Triage:

    Root cause (two layers both drop cursor: / vscode: links):

    • Web renderer: the rehype-sanitize schema in apps/web/src/components/ChatMarkdown.tsx:539-542 only adds file, t3-citation and t3-context to the default href protocols. The default schema doesn't include cursor: or vscode:, so the sanitizer strips those hrefs.
    • Desktop main process: parseSafeExternalUrl in apps/desktop/src/electron/ElectronShell.ts:17-50 accepts only http:/https: plus remote editor links (vscode://vscode-remote/ssh-remote+…, zed://ssh/…, and the matching remote schemes for capable editors). A local cursor://file/… or vscode://file/… URL returns none, so desktop:open-external (apps/desktop/src/ipc/methods/window.ts:313-320) never calls shell.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 file links just weren't covered.

    Proposed fix: extend #15722 (it adds a shared EXTERNAL_APP_LINK_SCHEMES allowlist for linear/slack/notion/obsidian in both the sanitizer and ElectronShell). Add editor schemes there (cursor, vscode, possibly vscode-insiders and zed), and in ElectronShell keep 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.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

  4. Same root cause for app schemes outside the editor set: obsidian:// here, and linear:// and slack:// behave the same way.

    Repro

    1. Have an agent reply with [note](obsidian://open?path=/Users/me/vault/note.md).
    2. 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.tsx markdownUrlTransform falls back to react-markdown's defaultUrlTransform, which empties the href, so the click handler returns on !href.
    • onContextMenu returns early when resolveExternalWebLinkHost(href) is null, so the chat's link menu is never built for non-web schemes.
    • ElectronShell.parseSafeExternalUrl accepts only http:/https: plus remote-editor deep links.

    #15722 allowlisted linear/slack/notion/obsidian in the renderer sanitizer and in ElectronShell. 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.

  5. fadeenk(GitHub profile, opens in a new tab)commented

    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

    1. Have an agent reply with [note](obsidian://open?vault=MyVault&file=Some%20Note).
    2. 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-Process opens the note, and the obsidian protocol is registered to Obsidian.exe, so the OS side is fine.

    Two layers both have to change

    1. Renderer: the sanitizer schema adds only file, t3-citation, t3-context and one other T3 scheme to the default href protocols, so an obsidian: href is stripped before the click.
    2. Desktop shell: parseSafeExternalUrl passes a URL to shell.openExternal only if its protocol is in SAFE_WEB_PROTOCOLS (http:, https:) or it is a remote-editor URL (vscode-remote, zed-ssh, jetbrains gateway). Claude ran the extracted function: https://… passes and obsidian://… 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 want cursor: and vscode:.

    Related: #21233 (Ideas discussion for this setting), #15722 (closed), #23486 (open, cursor/vscode only).

  6. I can reproduce this with discord:// links in T3 Code desktop on Windows. The bundled t3 CLI 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.

Sign in to join this conversation.