Feature: open Claude Desktop to a specific session UUID via CLI flag or deep link

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Apr 18, 2026 · closed Apr 20, 2026

Summary

No supported way to launch Claude Desktop (Windows/Mac/Linux) directly into a specific session by UUID. Restart / session-sharing / external-launcher tooling has to leave the user at the home screen.

Use case

Building a /restart plugin for Claude Code (forty4420/cc-restart — private testing, plan to make public). Flow:

  1. User: "restart yourself" (or /restart)
  2. Plugin preflights (dirty git, running background work)
  3. Plugin captures the current session UUID from the child CLI process command line (--resume <uuid>)
  4. Plugin gracefully closes desktop via WM_CLOSE (so Electron persists state)
  5. Plugin relaunches Claude.exe

Step 5 works, but the app opens to the home screen. There is no CLI flag or deep-link that can say "open session <uuid>".

What I tried

  • Claude.exe --resume <uuid> — flag ignored
  • claude://... URL protocol handler is registered (HKCU\Software\Classes\claude), but no documented path format
  • Disassembled app.asar — found claude-nest: / claude-nest-dev: / claude-nest-prod: protocols referenced, but no /session/ route
  • Local Storage / leveldb persistence is binary-encoded and not a documented surface
  • --remote-debugging-port flag is dropped because of Electron's single-instance lock (new launches are redirected to the running PID, flags stripped)

Ask

Either of these unlocks a lot of external tooling:

A. CLI flag

Claude.exe --resume <session-uuid>

Opens desktop directly to that session, or noop-with-warning if unknown UUID.

B. Deep link

claude://session/<session-uuid>

or equivalent. Route the existing registered claude:// URL handler to the session router.

Why this matters

Unblocks:

  • Self-restart plugins (preserve active session across restart)
  • Session bookmarking / sharing between machines via URL
  • External task launchers ("open Claude to session X when this build finishes")
  • IDE integrations that want to jump to a specific conversation

Related: #34320 (terminal /restart), #46927 (cowork restart loses sessions).

Platform

Windows 11. Claude Desktop 1.3109.0 (MSIX). Willing to test on mac/linux too if useful.

View original on GitHub ↗

3 Comments

0xbrainkid · 5 months ago

Direct navigation to a specific session UUID via CLI flag or deep link (claude --session <uuid> or claude://session/<uuid>) is a meaningful UX improvement for power users managing many sessions — particularly for automation, scripting, and multi-agent coordination where session IDs are known programmatically.

From an agent identity and session management perspective, the session UUID is the canonical identity for a conversation. Having a direct navigation path from UUID to active session closes the gap between "I have a session ID" (from logs, API responses, automation outputs) and "I can open that session."

Three implementation options in increasing complexity:

  1. CLI flag: claude --session <uuid> starts or resumes the specified session. If the session exists, resumes it. If not, creates a new session with that UUID (or errors). This is the most scriptable option and works in all contexts.
  1. Deep link (Desktop app): claude://session/<uuid> opens the Desktop app to the specified session. Standard URL scheme registration on macOS/Windows. Enables "open session" from other apps, scripts, scripts triggered by notifications.
  1. /goto slash command: In an active session, /goto <uuid> opens the specified session in a new tab (for multi-session Desktop support). Complementary to the above rather than a replacement.

Use cases:

  • Multi-agent orchestration (#48965): PM session opens worker sessions by UUID
  • Automation: CI/CD pipeline opens a session to continue debugging
  • Cross-machine: bookmark a session UUID and open it on another machine (if sessions sync)
  • Error reporting: bug reports include session UUID, developer can open exact session for context

This connects directly to the auto-rename sessions request (#50040) — if sessions can be navigated by UUID, programmatic naming becomes even more useful for disambiguation.

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/50067
  2. https://github.com/anthropics/claude-code/issues/43943
  3. https://github.com/anthropics/claude-code/issues/38015

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.