Repository navigation
Description
Problem or use case
Agent CLIs running inside Orca's terminal often emit links using OS-registered custom URL schemes. My concrete case: Claude Code produces obsidian://open?vault=...&file=... links so I can jump from a session to the note being discussed in Obsidian. Other common examples: vscode://, raycast://, linear://, notion://.
In a regular terminal (Terminal.app, iTerm2), clicking such a link delegates to the OS, which resolves the registered protocol handler and opens the app. In Orca, these links are dead: they are never linkified, and even if activated they would be dropped.
Two layers enforce this today:
src/main/ipc/shell.ts— theshell:openUrlhandler silently returns for any protocol other thanhttp:/https:.- The renderer's terminal link pipeline (
src/renderer/src/lib/http-link-routing.ts,terminal-web-link-click.ts) is explicitly scoped to http(s) URLs.
To be clear: I believe this restriction is intentional and correct as a default. Electron's security checklist warns against passing untrusted content to shell.openExternal, and terminal output is semi-trusted at best — agent output can be influenced by prompt injection from content the agent reads. This issue does not ask to lift the restriction; it asks for a user-approved handoff on top of it.
Proposed outcome
Chrome-style behavior for custom-scheme links in terminal output: the link is detected and clickable, and activating it shows a trusted Orca prompt ("Open Obsidian?") displaying the full URL and the scheme, with cancel / allow once / always allow for this scheme. Nothing ever opens without an explicit, recent user gesture plus approval (or a previously remembered grant).
This is the same trust model already proposed in #12719 for the embedded browser (Okta Verify handoff). This issue extends that model to a second surface: links rendered in the terminal. If maintainers prefer, this could be folded into #12719 as a shared "external protocol handoff" mechanism with two entry points.
Security requirements
Mirroring #12719, adapted to the terminal surface:
- Only act on a real user click on a rendered link — never on programmatic activation, never automatically on output.
- Resolve through the OS's registered protocol handler (
shell.openExternalafter validation); never execute a command derived from page or terminal content. - The approval dialog must show the full URL (scheme, host, query) so an injected malicious link is inspectable before opening.
- Hard-deny dangerous schemes regardless of user grants:
javascript:,data:,vbscript:,file:, and anything resolving to an executable path. - "Always allow" grants are per scheme, inspectable and revocable in Settings.
- Keep this entirely separate from the existing http(s) link routing (
openLinksInAppetc.), which stays unchanged.
Acceptance criteria
- A
obsidian://open?vault=...link printed by a CLI in the terminal is rendered as a link; clicking it prompts, and approval opens Obsidian via the OS handler. - The same URL activated without a user gesture does nothing.
- Denied, unknown-handler, malformed, and forbidden-scheme cases produce visible, non-crashing feedback.
http:/https:link behavior is unchanged.- A remembered per-scheme grant skips the prompt and can be revoked in Settings.
Related work
- [Feature]: Support user-approved external app protocol handoff from the embedded browser #12719 — user-approved external app protocol handoff from the embedded browser (same trust model, different surface)
- [Feature]: Make embedded-terminal capabilities (OSC 8 hyperlinks, inline images) detectable by agent TUIs #6880 — terminal capabilities detectability (OSC 8 hyperlinks), adjacent but about linkification capabilities, not protocol policy
Activity
feat(terminal): open custom app scheme links with user approval
feat(terminal): open custom app scheme links with user approval
DemiAsh commentedon Oct 1, 2026
+1, we hit exactly this.
Our case, generalized: a local desktop app registers its own URL scheme (say
myapp://<collection>/<path>.md) that opens a specific record in the app. Coding agents running in the terminal (Claude Code in our case) print these as OSC 8 hyperlinks in their answers, so that a ⌘-click takes you straight to the record being discussed. In iTerm2, Terminal.app or Ghostty the click goes to Launch Services and the app opens on the right record. In Orca the click is silently dropped: the OSC 8 handler only routeshttp(s):andfile:, andshell:openUrlaccepts onlyhttp(s):.Workarounds we tried, and why they are worse:
open "myapp://…$(pbpaste)…": copy, then click, and a different flow from every other link;The approval model described here (and implemented in #13237) would cover this fully. Even a per-scheme allow-list in Settings would be enough for this use case.
michalkechner-impact commentedon Oct 4, 2026
+1 on 1.4.219. OSC 8 links with a custom URL scheme open fine with Cmd-click in Ghostty, but in Orca the click is silently dropped. From reading #13237, its classifier accepts lowercase custom schemes, so landing it would cover this, even with a dialog on every click. For links clicked many times a day, a remembered per-scheme grant would be the natural follow-up.
Dakaric commentedon Oct 12, 2026
+1 from another use case, still reproducible on Orca 1.4.224 (macOS).
claude-code-statusline renders an OSC 8 link
claude-statusline://switch?to=<account>in the Claude Code status line. A Cmd-click hands it to a small registered macOS app that switches the active Claude account. It works in cmux and Terminal.app. In Orca the click is dropped silently, sincelinkHandler.activateonly routeshttp(s):andfile:.#13237 would cover it. The link gets clicked several times a day, so a remembered per-scheme grant would matter more to us than the approval dialog itself. For now our README points Orca users to this issue.