Claude Code Desktop App: Sessions, Diffs, and Worktrees
The Claude desktop app has three tabs: Chat, Cowork, and Code. The Code tab is Claude Code with a graphical interface. It runs the same engine as the CLI, reads the same settings and CLAUDE.md files, and adds things a terminal cannot easily show: a sidebar of parallel sessions, a diff viewer you can comment on line by line, a browser pane for previewing your app, and panes you can arrange side by side.
This guide follows Anthropic's desktop documentation. It covers installing the app, where a session can run (locally, in the cloud, or over SSH), the review loop, parallel sessions in Git worktrees, the workspace panes, and how Desktop relates to the CLI, including the features that only the CLI has.
New to Claude Code itself? Start with Getting Started with Claude Code. For running parallel work from the terminal instead, see Claude Code Worktrees and Parallel Sessions.
Install and start a first session
Claude Code in the desktop app needs a Pro, Max, Team, or Enterprise subscription. Downloads are on Anthropic's Claude Code docs: a universal build for macOS (Intel and Apple Silicon), Windows x64 and ARM64 installers, and a Linux beta installed through apt for Ubuntu and Debian. The app includes Claude Code, so you do not need Node.js or the CLI.
1. Install, launch, and sign in with your Anthropic account. 2. Click the Code tab. If it asks you to upgrade, your account has no paid plan. 3. Choose an environment (Local for your own files) and click Select folder. 4. Pick a model from the dropdown next to the send button. 5. Type a task, such as "Add tests for the main function".
What happens next depends on the permission mode in the selector next to the send button. In Manual, Claude proposes each change and waits for you to accept or reject it, so files are untouched until you approve. In Auto or Accept edits, Claude applies changes and a +12 -1 indicator appears for you to review afterwards. Plan proposes an approach without editing anything.
Quick reference
- Desktop reads
permissions.defaultModelike the CLI. A mode you pick in the selector is remembered per folder, except Plan, which lasts for the current session only. - Bypass permissions is off by default. On Pro and Max you enable it in Settings > Claude Code; on Team and Enterprise, organisation policy decides.
- Start with a small project you know well, so you can judge Claude's changes quickly.
- If Claude cannot find
npmor other tools, check that your shell profile setsPATH, then restart the app.
Remember this
Paid plan, Code tab, choose a folder, and check the permission mode before the first prompt.
Local, cloud, SSH, or WSL
When you start a session you choose where Claude runs. Local uses your files directly. Cloud sessions run on Anthropic-managed infrastructure by default and keep going even if you close the app or shut down your computer. SSH connects to a remote machine; Desktop installs Claude Code there automatically the first time you connect. On Windows, WSL runs the session inside a WSL 2 distribution, with tools and git on the Linux side.
The choice matters for what Claude can reach. A local session sees your uncommitted files, environment variables, and local services. A cloud session sees only what is in the GitHub repository it clones, plus what the cloud environment's setup script installs. An SSH session sees the remote machine, not your laptop.
| Environment | Runs on | Good for | Limits |
|---|---|---|---|
| Local | Your computer | Daily work on local files with your tools | Stops when the app closes |
| Cloud | Anthropic-managed VM | Long tasks that continue after you quit; repos not on your machine | Needs GitHub; no bypass mode, @mention, or + menu; edit by asking Claude |
| SSH | A server, VM, or dev container | Code that lives on a remote machine | No app preview in the Browser pane |
| WSL (Windows) | A WSL 2 distribution | Linux toolchains on Windows | No plugins, @mention, or + menu |
Quick reference
- A long task you started locally can be moved to the cloud from the session if it is taking longer than expected.
- Over SSH, a running task can keep going while Desktop is disconnected, but with a Claude account it can stop when its sign-in expires.
- Admins can turn off local sessions and distribute approved SSH connections, or restrict which SSH hosts users may connect to.
Remember this
Pick the environment by where the code and tools live: local for your laptop, cloud for work that must outlive the app, SSH for remote machines.
Review changes: the diff view and inline comments
After Claude edits files, a diff indicator such as +12 -1 appears. Click it (or press Cmd+Shift+D) to open the diff viewer, which lists changed files and shows each change.
The useful part is inline comments. Click any line in the diff to open a comment box, write what should change ("don't catch the error here"), and repeat for other lines. Press Cmd+Enter on macOS or Ctrl+Enter on Windows to send all comments at once. Claude reads them together, makes the changes, and the result appears as a new diff to review. This is faster and more precise than describing locations in chat.
For a second opinion, type /code-review in the prompt box. Claude reviews the changes and shows findings in a Code review card. After you open a pull request, Desktop can also monitor its CI checks, fix failures, or merge it once checks pass.
Quick reference
- Comments queue until you send them, so you can review a whole file before Claude starts revising.
- Inline comments and
/code-reviewcheck the diff, not behaviour. Run the tests in the terminal pane, or ask Claude to, before you commit. - Use Manual mode on unfamiliar code: you see each diff before it is written, instead of reviewing after the fact.
Remember this
Comment on lines in the diff and send them together; it gives Claude exact locations instead of descriptions.
Parallel sessions and Git worktrees
Each conversation in the Code tab is a session with its own chat history and project folder. The sidebar lists them; Cmd+N starts one and Ctrl+Tab cycles through them. Running two sessions on the same folder, though, means two agents editing the same files.
For Git repositories, select the worktree option next to the branch name when you start a session. The session then gets its own isolated copy of the project in a Git worktree, on its own branch, so its edits cannot collide with another session's. Worktrees are stored in <project-root>/.claude/worktrees/ by default; change that under Worktree location in Settings > Claude Code.
Two more tools help with parallel work. The tasks pane shows the subagents and background commands a session has running. A side chat (Cmd+;, or /btw) answers a quick question without adding it to the main session's context.
Quick reference
- Worktree isolation requires Git; you will see "Git is required" if it is missing. Repositories using Git LFS also need
git lfs install. - Check that
.claude/worktrees/is ignored by git in your repository, so worktree checkouts never show up as untracked files in the main tree. - Each worktree is a full checkout. Dependencies such as
node_modulesare not shared automatically, so a first build in each one takes time and disk. - Merging is still your job: review each session's branch and merge it like any other branch.
Remember this
Use the worktree option for every parallel session on the same repo; separate folders prevent agents from overwriting each other.
Terminal, editor, browser, and shortcuts
The chat, diff, terminal, file, and browser panes can be dragged into any layout.
- Terminal: press
Ctrl+backtick(Ctrl on every platform) or click Terminal in the session's title bar. It opens in the session's working directory with the same environment as Claude. Available in local and SSH sessions. - File editor: click a file path to open it. Available in local and SSH sessions; in cloud sessions, ask Claude to make the change.
- Browser pane: Claude can start your dev server and open the app in the Browser pane (
Cmd+Shift+B) to check its own changes, configured through.claude/launch.json. It can also open external sites. - Connectors: the + button next to the prompt adds connectors (MCP servers with a graphical setup, such as GitHub, Slack, or Linear), skills, and plugins.
Useful shortcuts (Ctrl instead of Cmd on Windows): Cmd+/ lists all shortcuts, Esc stops Claude's response, Cmd+Shift+M opens the permission-mode menu, Cmd+Shift+I the model menu, and Ctrl+O cycles view modes, including a verbose view.
Quick reference
- Attach images and PDFs, or drag files into the prompt;
@filenamepulls a file into the conversation in local and SSH sessions. - Scheduled tasks in Desktop run on your machine, so the computer must be awake for them to run.
- Desktop has no autocomplete-style inline code suggestions; it works through prompts and explicit changes.
Remember this
The terminal and browser panes let Claude run and see your app in the same window where you review its changes.
Desktop and the CLI together
Desktop and the CLI can run at the same time, even on the same project. They read the same configuration: CLAUDE.md and CLAUDE.local.md, ~/.claude/settings.json, MCP servers in ~/.claude.json or .mcp.json, hooks, and skills. A permission rule you add for the CLI applies in Desktop too.
Sessions can move between them, as the same session rather than a copy:
1# inside a CLI session: save it and open it in Desktop2/desktop3 4# from the shell (v2.1.285 or later)5claude --desktop --continue6claude --desktop --resume <session-id>In the other direction, close the session in the terminal and type /resume in the Desktop prompt box to pick from sessions you started in the CLI. /desktop and claude --desktop need macOS or x64 Windows and a Claude subscription; they do not work with API key authentication or on Bedrock, Google Cloud, or Foundry.
Some things stay CLI-only: -p and --output-format for scripting, the dontAsk permission mode, agent teams, and per-session --allowedTools. Desktop connects to Anthropic's API by default; running the Code tab on a cloud provider or a gateway needs a separate third-party configuration.
Quick reference
- Commands that open a terminal dialog behave differently in the Code tab;
/permissionsreplies that it is not available, so edit settings files instead. - Desktop also loads MCP servers from
claude_desktop_config.jsoninto local Code sessions. The standalone CLI does not read that file;claude mcp add-from-claude-desktopcopies them over on macOS and WSL. - Use Desktop for parallel sessions and visual review; use the CLI for scripts, CI, and anything automated.
Remember this
Same engine and config; move sessions with /desktop and /resume, and keep scripting and CI in the CLI.
Hands-on: two parallel sessions and a reviewed change
Use a Git repository with a test command.
1. Open the Code tab, choose Local, select the repository, and set the mode to Manual.
2. Start a session with the worktree option and ask: "add input validation to one function and write a test for it".
3. Start a second worktree session on the same repository and ask for an unrelated change, such as updating the README.
4. In the first session, open the diff, leave two inline comments, and send them with Cmd+Enter. Review the new diff.
5. Open the terminal pane in each session and run git status. Each should show only its own changes, on its own branch.
6. In a terminal outside Desktop, run claude in the repository, then /desktop, and confirm the session opens in the app.
Pass criterion: the two sessions never touch each other's files, the inline comments produce a revised diff, and the CLI session continues in Desktop with its history.
Quick reference
- If both sessions show the same changes, the worktree option was not selected; check
.claude/worktrees/. - If
/desktopis missing, check that you are signed in with a Claude subscription rather than an API key. - Delete the worktree branches you do not merge, so
.claude/worktrees/does not fill up.
Remember this
Worktree sessions, inline comments, and the CLI handoff are the three Desktop features worth learning first.
Key takeaway
The Code tab in Claude Desktop is Claude Code with a window around it: the same engine and configuration as the CLI, plus a session sidebar, a diff viewer with inline comments, terminal, editor, and browser panes, and connectors. Sessions run locally, in the cloud, over SSH, or in WSL, and the environment decides what Claude can reach. For parallel work on one repository, use the worktree option so sessions cannot overwrite each other.
Desktop does not replace the CLI. Scripting, dontAsk, agent teams, and provider configurations stay in the terminal, and /desktop moves a session across when you want visual review. For the permission rules both share, see Claude Code Permissions; for cloud sessions in depth, see Claude Code Web Sessions.
Practice (30 min): run the six steps above, then decide which of your regular tasks you would keep in the CLI and which you would move to Desktop, and why.
References
- Claude Code docs: Get started with the desktop app — checked Oct 17, 2026
- Claude Code docs: Use Claude Code Desktop — checked Oct 17, 2026
Shoaib Hossain
Lead Author & Systems ArchitectSoftware engineer and distributed systems architect specializing in backend scalability, cloud-native infrastructure, databases, and AI engineering workflows. Author and maintainer of Core Concept Learning.
Related Articles
Explore this topic