Skip to content
Tips & Tricks
Claude Code

/desktop - Continue Your CLI Session in the Desktop App

Switch from terminal to the Claude Code Desktop app mid-conversation without losing your context. One command, full session transfer.

claude-codedesktopsessionguiworkflow

What is it

You're deep in a Claude Code session in the terminal, and you realize you'd rather be in the Desktop app. Visual diffs and parallel sessions would make this easier. Instead of starting over and losing your entire conversation, type /desktop and Claude moves the whole session to the Desktop app. Same conversation, same context. The CLI exits, the Desktop app opens, and you pick up right where you left off.

Claude Code Desktop docs

What problems it solves

You're 45 minutes into a complex refactor in the terminal. Claude has read a dozen files, you've made decisions together, and now you want to see those diffs visually instead of squinting at terminal output. Starting a new session in the Desktop app means re-explaining everything. /desktop moves the session instead.

Or you started in the CLI because that's where you always start. But now the work shifted to something more visual, and the Desktop app's pane layout would make reviewing easier. One command gets you there without losing any progress.

How to use it

Type it in any active session:

|claude-code
/desktop

Claude saves the session and opens it in the Desktop app. The CLI exits automatically.

There's also a shorter alias:

|claude-code
/app

Same result, fewer characters.

What you need

The Claude Code Desktop app has to be installed and you need to be signed in. This works on macOS and Windows. Linux doesn't have a Desktop app yet, so the command won't appear there.

What transfers

Your full conversation history, tool results, and code changes carry over. MCP servers configured in ~/.claude.json or .mcp.json work in both CLI and Desktop, so those keep working too.

The gotcha: shell environment variables don't transfer automatically. If you set custom env vars in your terminal profile (beyond PATH and Claude-specific variables), you'll need to add them in the Desktop app's Settings under the local environment editor.

Pro tips

If you're starting a session and think you might want the GUI later, don't overthink it. Start in the CLI. Knowing /desktop exists means you don't have to choose upfront. Start where it's convenient, move when it makes sense.

The Desktop app can send sessions the other direction too. Use the "Continue in" menu to push a Desktop session to Claude Code on the Web or to your IDE at the current working directory.

References