[FEATURE] Open Claude Desktop in a specific folder via CLI flag or deep link (new Code session, not Cowork home)

Open 💬 6 comments Opened Apr 29, 2026 by gsamat

Summary

No supported way to launch Claude Desktop directly into a new Code session rooted at a specific folder. Launching the app via dock icon, open -a "Claude", or open -na "Claude" --args ... always lands on the Cowork home / project picker, regardless of any path argument or claude:// URL.

Use case

I keep dozens of project folders. Today the only fast path to a Code session in /path/to/project is the terminal:

cd /path/to/project && claude

That works, but it's terminal-only. Inside Claude Desktop the workflow is:

  1. Click the dock icon → Cowork home
  2. Click "New session" → folder picker
  3. Navigate to the folder → confirm
  4. Wait for the session to spawn

Every time. No way to script it, no Finder right-click, no Raycast/Alfred integration, no .command shortcut.

What I tried

  • open -na "Claude Code" --args --add-dir /path — opens Cowork home, args dropped (Electron single-instance lock, second-instance flags stripped).
  • open -nb com.anthropic.claude-code --args /path — same.
  • cd /path && open -na "Claude" — cwd not inherited by the Electron renderer; lands on home screen.
  • claude:// scheme is registered (setAsDefaultProtocolClient("claude")), but no documented claude://session/new?cwd=... route. Disassembled app.asar — only cowork-artifact: / cowork-file: / claude-simulator: / operon-artifact: schemes are wired, none route to "new Code session in folder".
  • claude-cli://open?q=... (existing scheme on the URL Handler app) launches the terminal CLI, not the desktop Cowork host.
  • App ignores argv other than --startup (grep argv.includes in app.asar yields only "--startup").

Ask

Either of these closes the gap:

A. CLI flag

open -na "Claude" --args --cwd /path/to/project
# or
Claude.app/Contents/MacOS/Claude --cwd /path/to/project

Spawns a new Code session rooted at the given path, bypassing the Cowork picker. Equivalent to what the terminal CLI does today with cd && claude.

B. Deep link

claude://session/new?cwd=/path/to/project

Route the existing registered claude:// handler to the Code session router with a cwd query param. Symmetric with the deep-link request in #50345 (resume by UUID) — that one targets existing sessions, this one targets new sessions in a folder.

C. open <folder> association

Treat folder paths passed via open / Finder drag-onto-dock as "new Code session here":

open -a "Claude" /path/to/project

This is the standard macOS pattern (VS Code, Sublime, Xcode all do this). Today the path is silently dropped.

Why this matters

  • Finder Quick Action — right-click folder → "Open in Claude Code" becomes possible.
  • Raycast / Alfred / Shortcuts — power-user launchers can target Code sessions instead of being stuck at the picker.
  • IDE-style workflow — match what every other dev desktop app on macOS does (code ., subl ., idea .).
  • Scriptable from any tool — build hooks, post-commit triggers, CI dashboards can deep-link to a fresh Code session in the right folder.

The terminal CLI already does this trivially. Bringing the desktop app to parity unblocks a lot of automation.

Related

  • #50345 — open Desktop to specific session UUID (closed as dup, but the underlying capability — deep-link routing in Cowork — is the same)
  • #50067 — /resume in desktop app
  • #43943 — claude-desktop://resume?session=<id> for -p sessions

This request is the new-session, by-folder counterpart to those (which are all resume, by UUID).

Platform

macOS 15.x (Darwin 24.6.0). Claude Desktop 1.5354.0, claude-code 2.1.121.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗