Make the gated `code` session deep link reachable so external tools can focus a running Desktop session
Problem
There is no way for external tooling (or the user, via URL) to focus a running Claude Code session in the Desktop app. Ecosystem tools that track live sessions — for example claude-status-bar (menu bar indicator for Claude Code, ~655 stars) — can detect sessions via hooks (session_id is exposed) but cannot take the user to the conversation where the agent is actually working. See m1ckc3s/claude-status-bar#19 and #58.
(Edited: an earlier version of this issue claimed the code deep link route had been removed. That was wrong — correction below thanks to @m1ckc3s, who inspected the current bundle.)
What we verified (macOS Desktop app, August 2026)
- The focus capability already exists — it is feature-gated. The URL handler in the current bundle (1.26832.0) still carries a
Codecase in its host switch; with the flag off it logscode session deep link gated offand returns without acting. So the app already knows how to resolve an id to a session route and navigate straight to it, without importing anything. claude://resume?session=<uuid>does not focus — it imports. Tested live: for a session born in the Desktop app it creates a new record (local_<uuid>.json,cliSessionIdset) containing a stale snapshot of the transcript, while the live session keeps advancing separately. Re-invocations are deduplicated, but the result is still a frozen copy — not the live conversation.- The id mapping external tools need already exists on disk. Session records under
~/Library/Application Support/Claude/claude-code-sessions/<org>/<account>/local_*.jsoncarry both the nativesessionIdand the CLIcliSessionId(pluscwd), so a hook-provided UUID is cheaply resolvable to the app's own session record.
Request
Make the existing, gated focus path reachable for outside tools:
- enable the
codedeep link (or an equivalent verb such asclaude://focus?session=<uuid>), and - accept — or document — an id that external tools can actually obtain: the CLI session UUID that hooks already expose (resolvable via the on-disk records above), rather than an opaque internal id.
Semantics: focus the existing conversation (window forward + navigate) — never import, never duplicate; no-op if the session doesn't exist.
This is not a request for new functionality — it's a request for an existing capability to be reachable with an obtainable id. It unblocks per-session click-to-focus for the ecosystem of session monitors: the claude-status-bar maintainer has already said he'd take that PR the moment this lands. Happy to provide traces or test on macOS.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗