2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt
3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.
4 4
5# Claude Code on desktop5# Use Claude Code Desktop
6 6
7> Run Claude Code tasks locally or on secure cloud infrastructure with the Claude desktop app7> Get more out of Claude Code Desktop: parallel sessions with Git isolation, visual diff review, app previews, PR monitoring, permission modes, connectors, and enterprise configuration.
8 8
9<Note>9The Code tab within the Claude Desktop app lets you use Claude Code through a graphical interface instead of the terminal.
10 Claude Code on desktop is currently in preview.
11</Note>
12 10
13Claude Code is an AI coding assistant that works directly with your codebase. Unlike Claude.ai chat, it can read your project files, edit code, run terminal commands, and understand how different parts of your code connect. You watch changes happen in real time.11Desktop adds these capabilities on top of the standard Claude Code experience:
14 12
15You can use Claude Code through the terminal ([CLI](/en/quickstart)) or through the desktop app described here. Both provide the same core capabilities. The desktop app adds a graphical interface and visual session management.13* Visual diff review with inline comments
14* Live app preview with dev servers
15* GitHub PR monitoring with auto-fix and auto-merge
16* Parallel sessions with automatic Git worktree isolation
17* Connectors for GitHub, Slack, Linear, and more
18* Local, [SSH](#ssh-sessions), and [cloud](#run-long-running-tasks-remotely) environments
16 19
17<CardGroup cols={2}>20<Tip>
18 <Card title="New to Claude Code?" icon="rocket" href="#installation-and-setup">21 New to Desktop? Start with [Get started](/en/desktop-quickstart) to install the app and make your first edit.
19 Start here to install and make your first edit22</Tip>
20 </Card>
21 23
22 <Card title="Coming from the CLI?" icon="terminal" href="#how-desktop-relates-to-cli">24This page covers [working with code](#work-with-code), [managing sessions](#manage-sessions), [extending Claude Code](#extend-claude-code), and [configuration](#environment-configuration). It also includes a [CLI comparison](#coming-from-the-cli) and [troubleshooting](#troubleshooting).
23 See what's shared and what's different
24 </Card>
25</CardGroup>
26 25
27The desktop app has three tabs:26## Start a session
28 27
29* **Chat**: A conversational interface for general questions and tasks (like Claude.ai)28Before you send your first message, configure four things in the prompt area:
30* **Cowork**: An autonomous agent that works on tasks in the background
31* **Code**: An AI coding assistant that reads and edits your project files directly
32 29
33This documentation covers the **Code** tab. For the chat interface, see the [Claude Desktop support articles](https://support.claude.com/en/collections/16163169-claude-desktop).30* **Environment**: choose where Claude runs. Select **Local** for your machine, **Remote** for Anthropic-hosted cloud sessions, or an [**SSH connection**](#ssh-sessions) for a remote machine you manage. See [environment configuration](#environment-configuration).
31* **Project folder**: select the folder or repository Claude works in. For remote sessions, you can add [multiple repositories](#run-long-running-tasks-remotely).
32* **Model**: pick a [model](/en/model-config#available-models) from the dropdown next to the send button. The model is locked once the session starts.
33* **Permission mode**: choose how much autonomy Claude has from the [mode selector](#choose-a-permission-mode). You can change this during the session.
34 34
35## Installation and setup35Type your task and press **Enter** to start. Each session tracks its own context and changes independently.
36 36
37<Steps>37## Work with code
38 <Step title="Download the app">
39 Download Claude for your platform. You'll need an Anthropic account ([sign up at claude.ai](https://claude.ai) if you don't have one).
40 38
41 <CardGroup cols={2}>39Give Claude the right context, control how much it does on its own, and review what it changed.
42 <Card title="macOS" icon="apple" href="https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs">
43 Universal build for Intel and Apple Silicon
44 </Card>
45 40
46 <Card title="Windows" icon="windows" href="https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code&utm_medium=docs">41### Use the prompt box
47 For x64 processors
48 </Card>
49 </CardGroup>
50 42
51 For Windows ARM64, [download here](https://claude.ai/api/desktop/win32/arm64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs). Local sessions are not available on ARM64 devices, so use remote sessions instead.43Type what you want Claude to do and press **Enter** to send. Claude reads your project files, makes changes, and runs commands based on your [permission mode](#choose-a-permission-mode). You can interrupt Claude at any point: click the stop button or type your correction and press **Enter**. Claude stops what it's doing and adjusts based on your input.
52 44
53 Linux is not currently supported.45The **+** button next to the prompt box gives you access to file attachments, [skills](#use-skills), [connectors](#connect-external-tools), and [plugins](#install-plugins).
54 </Step>
55 46
56 <Step title="Open the app and sign in">47### Add files and context to prompts
57 Launch Claude from your Applications folder (macOS) or Start menu (Windows). Sign in with your Anthropic account.
58 </Step>
59 48
60 <Step title="Select the Code tab">49The prompt box supports two ways to bring in external context:
61 Click the **Code** tab in the top left. If clicking Code prompts you to sign in online, complete the sign-in and restart the app.
62 </Step>
63</Steps>
64 50
65## Getting started51* **@mention files**: type `@` followed by a filename to add a file to the conversation context. Claude can then read and reference that file.
52* **Attach files**: attach images, PDFs, and other files to your prompt using the attachment button, or drag and drop files directly into the prompt. This is useful for sharing screenshots of bugs, design mockups, or reference documents.
66 53
67If you already use the CLI, you can skip to [How Desktop relates to CLI](#how-desktop-relates-to-cli) for a quick overview of differences.54### Choose a permission mode
68 55
69<Steps>56Permission modes control how much autonomy Claude has during a session: whether it asks before editing files, running commands, or both. You can switch modes at any time using the mode selector next to the send button. Start with Ask permissions to see exactly what Claude does, then move to Auto accept edits or Plan mode as you get comfortable.
70 <Step title="Choose a folder and environment">
71 Select **Local** to run Claude on your machine using your files directly. This is the best choice for getting started. Click **Select folder** and choose your project directory.
72 57
73 You can also run [remote sessions](/en/claude-code-on-the-web) that continue in the cloud even if you close the app.58| Mode | Settings key | Behavior |
74 </Step>59| ---------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60| **Ask permissions** | `default` | Claude asks before editing files or running commands. You see a diff and can accept or reject each change. Recommended for new users. |
61| **Auto accept edits** | `acceptEdits` | Claude auto-accepts file edits but still asks before running terminal commands. Use this when you trust file changes and want faster iteration. |
62| **Plan mode** | `plan` | Claude analyzes your code and creates a plan without modifying files or running commands. Good for complex tasks where you want to review the approach first. |
63| **Bypass permissions** | `bypassPermissions` | Claude runs without any permission prompts, equivalent to `--dangerously-skip-permissions` in the CLI. Enable in your Settings → Claude Code under "Allow bypass permissions mode". Only use this in sandboxed containers or VMs. Enterprise admins can disable this option. |
75 64
76 <Step title="Start a session">65The `dontAsk` permission mode is available only in the [CLI](/en/permissions#permission-modes).
77 Type what you want Claude to do:
78 66
79 * "Find a TODO comment and fix it"67<Tip title="Best practice">
80 * "Add tests for the main function"68 Start complex tasks in Plan mode so Claude maps out an approach before making changes. Once you approve the plan, switch to Auto accept edits or Ask permissions to execute it. See [explore first, then plan, then code](/en/best-practices#explore-first-then-plan-then-code) for more on this workflow.
81 * "Create a CLAUDE.md with instructions for this codebase"69</Tip>
82 70
83 A **session** is a conversation with Claude about your code. Each session tracks its own context and changes, so you can work on multiple tasks without them interfering with each other.71Remote sessions support Auto accept edits and Plan mode. Ask permissions is not available because remote sessions auto-accept file edits by default, and Bypass permissions is not available because the remote environment is already sandboxed.
84 </Step>
85 72
86 <Step title="Review and accept changes">73Enterprise admins can restrict which permission modes are available. See [enterprise configuration](#enterprise-configuration) for details.
87 By default, Code is in **Ask** mode, where Claude proposes changes and waits for your approval before applying them. You'll see:
88 74
89 1. **A diff view** showing exactly what will change in each file75### Preview your app
90 2. **Accept/Reject buttons** to approve or decline each change
91 3. **Real-time updates** as Claude works through your request
92 76
93 If you reject a change, Claude will ask how you'd like to proceed differently. Your files aren't modified until you accept.77Claude can start a dev server and open an embedded browser to verify its changes. This works for frontend web apps as well as backend servers: Claude can test API endpoints, view server logs, and iterate on issues it finds. In most cases, Claude starts the server automatically after editing project files. You can also ask Claude to preview at any time. By default, Claude [auto-verifies](#auto-verify-changes) changes after every edit.
94 </Step>
95</Steps>
96 78
97The sections below cover commands, permission modes, parallel sessions, and ways to extend Claude Code with custom workflows and integrations.79From the preview panel, you can:
98 80
99## What you can do81* Interact with your running app directly in the embedded browser
82* Watch Claude verify its own changes automatically: it takes screenshots, inspects the DOM, clicks elements, fills forms, and fixes issues it finds
83* Start or stop servers from the **Preview** dropdown in the session toolbar
84* Persist cookies and local storage across server restarts by selecting **Persist sessions** in the dropdown, so you don't have to re-login during development
85* Edit the server configuration or stop all servers at once
100 86
101Claude Code can edit files, run terminal commands, and understand how your code connects. Try prompts like:87Claude creates the initial server configuration based on your project. If your app uses a custom dev command, edit `.claude/launch.json` to match your setup. See [Configure preview servers](#configure-preview-servers) for the full reference.
102 88
103* `Fix the bug in the login function`89To clear saved session data, toggle **Persist preview sessions** off in Settings → Claude Code. To disable preview entirely, toggle off **Preview** in Settings → Claude Code.
104* `Run the tests and fix any failures`
105* `How does the authentication flow work?`
106 90
107You can rename, resume, and archive sessions through the sidebar.91### Review changes with diff view
108 92
109### Choose a permission mode93After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request.
110 94
111Control how Claude works using the mode selector next to the send button:95When Claude changes files, a diff stats indicator appears showing the number of lines added and removed, such as `+12 -1`. Click this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.
112 96
113* **Ask** (recommended for new users): Claude asks for your approval before each file edit or command. You see a diff view and can accept or reject each change.97To comment on specific lines, click any line in the diff to open a comment box. Type your feedback and press **Enter** to add the comment. After adding comments to multiple lines, submit all comments at once:
114* **Code**: Claude auto-accepts file edits but still asks before running terminal commands. Use this when you trust file changes and want faster iteration.
115* **Plan**: Claude creates a detailed plan for your approval before making any changes. Good for complex tasks where you want to review the approach first.
116* **Act**: Claude runs without permission checks, automatically executing file edits and terminal commands. Only use this mode in trusted environments.
117 98
118<Warning title="Act mode">99* **macOS**: press **Cmd+Enter**
119 Act runs in `bypassPermissions` mode, which disables all permission checks and should only be used in isolated environments like containers or VMs where Claude Code cannot cause damage. This mode is disabled by default. For personal accounts, enable it in [Claude Code personal settings](https://claude.ai/settings/claude-code). For Team and Enterprise plans, admins must enable it in [Claude Code admin settings](https://claude.ai/admin-settings/claude-code). Act mode does not persist across sessions.100* **Windows**: press **Ctrl+Enter**
120</Warning>
121 101
122To stop Claude mid-task, click the stop button.102Claude reads your comments and makes the requested changes, which appear as a new diff you can review.
123 103
124Remote sessions only support **Code** and **Plan** modes because they continue running in the background without requiring your active participation. See [permission modes](/en/permissions#permission-modes) for details on how these work internally.104### Review your code
125 105
126### Work in parallel with sessions106In the diff view, click **Review code** in the top-right toolbar to ask Claude to evaluate the changes before you commit. Claude examines the current diffs and leaves comments directly in the diff view. You can respond to any comment or ask Claude to revise.
107
108The review focuses on high-signal issues: compile errors, definite logic errors, security vulnerabilities, and obvious bugs. It does not flag style, formatting, pre-existing issues, or anything a linter would catch.
109
110### Monitor pull request status
127 111
128Click **+ New session** in the sidebar to work on multiple tasks in parallel. For Git repositories, each session gets its own isolated copy of your project using worktrees, so changes in one session don't affect another until you commit them. Worktrees are stored in `~/.claude-worktrees/` by default.112After you open a pull request, a CI status bar appears in the session. Claude Code uses the GitHub CLI to poll check results and surface failures.
113
114* **Auto-fix**: when enabled, Claude automatically attempts to fix failing CI checks by reading the failure output and iterating.
115* **Auto-merge**: when enabled, Claude merges the PR once all checks pass. The merge method is squash. Auto-merge must be [enabled in your GitHub repository settings](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) for this to work.
116
117Use the **Auto-fix** and **Auto-merge** toggles in the CI status bar to enable either option. Claude Code also sends a desktop notification when CI finishes.
129 118
130<Note>119<Note>
131 Session isolation requires [Git](https://git-scm.com/downloads). Without Git, sessions in the same directory edit the same files, so changes in one session are immediately visible in others.120 PR monitoring requires the [GitHub CLI (`gh`)](https://cli.github.com/) to be installed and authenticated on your machine. If `gh` is not installed, Desktop prompts you to install it the first time you try to create a PR.
132</Note>121</Note>
133 122
134To include files listed in your `.gitignore` (like `.env`) in new worktrees, create a `.worktreeinclude` file in your project root listing the file patterns to copy.123## Manage sessions
135 124
136To manage a session, click its dropdown in the sidebar to rename it, archive it, or check context usage. When context fills up, Claude automatically summarizes the conversation. You can also ask Claude to compact if you want to free up space earlier.125Each session is an independent conversation with its own context and changes. You can run multiple sessions in parallel or send work to the cloud.
126
127### Work in parallel with sessions
128
129Click **+ New session** in the sidebar to work on multiple tasks in parallel. For Git repositories, each session gets its own isolated copy of your project using [Git worktrees](/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees), so changes in one session don't affect other sessions until you commit them.
130
131Worktrees are stored in `<project-root>/.claude/worktrees/` by default. You can change this to a custom directory in Settings → Claude Code under "Worktree location". You can also set a branch prefix that gets prepended to every worktree branch name, which is useful for keeping Claude-created branches organized. To remove a worktree when you're done, hover over the session in the sidebar and click the archive icon.
132
133<Note>
134 Session isolation requires [Git](https://git-scm.com/downloads). Most Macs include Git by default. Run `git --version` in Terminal to check. On Windows, Git is required for the Code tab to work: [download Git for Windows](https://git-scm.com/downloads/win), install it, and restart the app. If you run into Git errors, try a Cowork session to help troubleshoot your setup.
135</Note>
136
137Use the filter icon at the top of the sidebar to filter sessions by status (Active, Archived) and environment (Local, Cloud). To rename a session or check context usage, click the session title in the toolbar at the top of the active session. When context fills up, Claude automatically summarizes the conversation and continues working. You can also type `/compact` to trigger summarization earlier and free up context space. See [the context window](/en/how-claude-code-works#the-context-window) for details on how compaction works.
137 138
138### Run long-running tasks remotely139### Run long-running tasks remotely
139 140
140For large refactors, test suites, migrations, or other long-running tasks, select **Remote** instead of **Local** when starting a session. Remote sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction.141For large refactors, test suites, migrations, or other long-running tasks, select **Remote** instead of **Local** when starting a session. Remote sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor remote sessions from [claude.ai/code](https://claude.ai/code) or the Claude iOS app.
141 142
142Remote sessions support **Code** and **Plan** modes. See [Claude Code on the web](/en/claude-code-on-the-web) for details on configuring remote environments.143Remote sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the repo pill to add additional repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers.
143 144
144### Review changes with diff view145See [Claude Code on the web](/en/claude-code-on-the-web) for more on how remote sessions work.
145 146
146After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request.147### Continue in another surface
147 148
148When Claude changes files, a diff stats indicator appears showing the number of lines added and removed (for example, `+12 -1`). Click this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.149The **Continue in** menu, accessible from the VS Code icon in the bottom right of the session toolbar, lets you move your session to another surface:
149 150
150To comment on specific lines, click any line in the diff to open a comment box. Type your feedback and press **Enter** to send. In the full diff view, press **Enter** to accept each comment, then **Cmd+Enter** to send them all. Claude reads your comments and makes the requested changes, which appear as a new diff you can review.151* **Claude Code on the Web**: sends your local session to continue running remotely. Desktop pushes your branch, generates a summary of the conversation, and creates a new remote session with the full context. You can then choose to archive the local session or keep it. This requires a clean working tree, and is not available for SSH sessions.
152* **Your IDE**: opens your project in a supported IDE at the current working directory.
151 153
152## Extend Claude Code154## Extend Claude Code
153 155
154You can extend Claude Code with custom commands, automated workflows, and external integrations.156Connect external services, add reusable workflows, customize Claude's behavior, and configure preview servers.
155 157
156### Connect external tools158### Connect external tools
157 159
158For local sessions, click the **...** button before starting and select **Connectors** to add integrations like Google Calendar, Slack, GitHub, Linear, Notion, and more. Connectors must be configured before the session starts and are only available for local sessions. Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session.160For local and [SSH](#ssh-sessions) sessions, click the **+** button next to the prompt box and select **Connectors** to add integrations like Google Calendar, Slack, GitHub, Linear, Notion, and more. You can add connectors before or during a session. Connectors are not available for remote sessions.
161
162To manage or disconnect connectors, go to Settings → Connectors in the desktop app, or select **Manage connectors** from the Connectors menu in the prompt box.
163
164Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session.
159 165
160Connectors are [MCP (Model Context Protocol) servers](/en/mcp) with built-in setup. You can also [create custom connectors](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp) or add MCP servers manually via [configuration files](/en/mcp#configure-mcp-servers).166Connectors are [MCP servers](/en/mcp) with a graphical setup flow. Use them for quick integration with supported services. For integrations not listed in Connectors, add MCP servers manually via [settings files](/en/mcp#installing-mcp-servers). You can also [create custom connectors](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp).
161 167
162### Create custom skills168### Use skills
163 169
164[Skills](/en/skills) are reusable prompts that extend Claude's capabilities. For example, you could create a `review` skill that runs your standard code review checklist, or a `deploy` skill that walks through your deployment steps. Skills are defined as markdown files in `.claude/skills/` and can include instructions, context, and even call other tools. Ask Claude what skills are available or to run a specific skill. Claude can also help you create a skill if you describe what you want, or see [skills](/en/skills) to learn how to write them yourself.170[Skills](/en/skills) extend what Claude can do. Claude loads them automatically when relevant, or you can invoke one directly: type `/` in the prompt box or click the **+** button and select **Slash commands** to browse what's available. This includes [built-in commands](/en/interactive-mode#built-in-commands), your [custom skills](/en/skills#create-custom-skills), project skills from your codebase, and skills from any [installed plugins](/en/plugins). Select one and it appears highlighted in the input field. Type your task after it and send as usual.
165 171
166### Automate workflows with hooks172### Install plugins
167 173
168[Hooks](/en/hooks) run shell commands automatically in response to Claude Code events. For example, you could run a linter after every file edit, auto-format code, or send notifications when tasks complete. Hooks are configured in your [settings files](/en/settings). See [hooks](/en/hooks) for available events and configuration examples.174[Plugins](/en/plugins) are reusable packages that add skills, agents, hooks, MCP servers, and LSP configurations to Claude Code. You can install plugins from the desktop app without using the terminal.
175
176For local and [SSH](#ssh-sessions) sessions, click the **+** button next to the prompt box and select **Plugins** to see your installed plugins and their commands. To add a plugin, select **Add plugin** from the submenu to open the plugin browser, which shows available plugins from your configured [marketplaces](/en/plugin-marketplaces) including the official Anthropic marketplace. Select **Manage plugins** to enable, disable, or uninstall plugins.
177
178Plugins can be scoped to your user account, a specific project, or local-only. Plugins are not available for remote sessions. For the full plugin reference including creating your own plugins, see [plugins](/en/plugins).
179
180### Configure preview servers
181
182Claude automatically detects your dev server setup and stores the configuration in `.claude/launch.json` at the root of the folder you selected when starting the session. Preview uses this folder as its working directory, so if you selected a parent folder, subfolders with their own dev servers won't be detected automatically. To work with a subfolder's server, either start a session in that folder directly or add a configuration manually.
183
184To customize how your server starts, for example to use `yarn dev` instead of `npm run dev` or to change the port, edit the file manually or click **Edit configuration** in the Preview dropdown to open it in your code editor. The file supports JSON with comments.
185
186```json theme={null}
187{
188 "version": "0.0.1",
189 "configurations": [
190 {
191 "name": "my-app",
192 "runtimeExecutable": "npm",
193 "runtimeArgs": ["run", "dev"],
194 "port": 3000
195 }
196 ]
197}
198```
199
200You can define multiple configurations to run different servers from the same project, such as a frontend and an API. See the [examples](#examples) below.
201
202#### Auto-verify changes
203
204When `autoVerify` is enabled, Claude automatically verifies code changes after editing files. It takes screenshots, checks for errors, and confirms changes work before completing its response.
205
206Auto-verify is on by default. Disable it per-project by adding `"autoVerify": false` to `.claude/launch.json`, or toggle it from the **Preview** dropdown menu.
207
208```json theme={null}
209{
210 "version": "0.0.1",
211 "autoVerify": false,
212 "configurations": [...]
213}
214```
215
216When disabled, preview tools are still available and you can ask Claude to verify at any time. Auto-verify makes it automatic after every edit.
217
218#### Configuration fields
219
220Each entry in the `configurations` array accepts the following fields:
221
222| Field | Type | Description |
223| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
224| `name` | string | A unique identifier for this server |
225| `runtimeExecutable` | string | The command to run, such as `npm`, `yarn`, or `node` |
226| `runtimeArgs` | string\[] | Arguments passed to `runtimeExecutable`, such as `["run", "dev"]` |
227| `port` | number | The port your server listens on. Defaults to 3000 |
228| `cwd` | string | Working directory relative to your project root. Defaults to the project root. Use `${workspaceFolder}` to reference the project root explicitly |
229| `env` | object | Additional environment variables as key-value pairs, such as `{ "NODE_ENV": "development" }`. Don't put secrets here since this file is committed to your repo. Secrets set in your shell profile are inherited automatically. |
230| `autoPort` | boolean | How to handle port conflicts. See below |
231| `program` | string | A script to run with `node`. See [when to use `program` vs `runtimeExecutable`](#when-to-use-program-vs-runtimeexecutable) |
232| `args` | string\[] | Arguments passed to `program`. Only used when `program` is set |
233
234##### When to use `program` vs `runtimeExecutable`
235
236Use `runtimeExecutable` with `runtimeArgs` to start a dev server through a package manager. For example, `"runtimeExecutable": "npm"` with `"runtimeArgs": ["run", "dev"]` runs `npm run dev`.
237
238Use `program` when you have a standalone script you want to run with `node` directly. For example, `"program": "server.js"` runs `node server.js`. Pass additional flags with `args`.
239
240#### Port conflicts
241
242The `autoPort` field controls what happens when your preferred port is already in use:
243
244* **`true`**: Claude finds and uses a free port automatically. Suitable for most dev servers.
245* **`false`**: Claude fails with an error. Use this when your server must use a specific port, such as for OAuth callbacks or CORS allowlists.
246* **Not set (default)**: Claude asks whether the server needs that exact port, then saves your answer.
247
248When Claude picks a different port, it passes the assigned port to your server via the `PORT` environment variable.
249
250#### Examples
251
252These configurations show common setups for different project types:
253
254<Tabs>
255 <Tab title="Next.js">
256 This configuration runs a Next.js app using Yarn on port 3000:
257
258 ```json theme={null}
259 {
260 "version": "0.0.1",
261 "configurations": [
262 {
263 "name": "web",
264 "runtimeExecutable": "yarn",
265 "runtimeArgs": ["dev"],
266 "port": 3000
267 }
268 ]
269 }
270 ```
271 </Tab>
272
273 <Tab title="Multiple servers">
274 For a monorepo with a frontend and an API server, define multiple configurations. The frontend uses `autoPort: true` so it picks a free port if 3000 is taken, while the API server requires port 8080 exactly:
275
276 ```json theme={null}
277 {
278 "version": "0.0.1",
279 "configurations": [
280 {
281 "name": "frontend",
282 "runtimeExecutable": "npm",
283 "runtimeArgs": ["run", "dev"],
284 "cwd": "apps/web",
285 "port": 3000,
286 "autoPort": true
287 },
288 {
289 "name": "api",
290 "runtimeExecutable": "npm",
291 "runtimeArgs": ["run", "start"],
292 "cwd": "server",
293 "port": 8080,
294 "env": { "NODE_ENV": "development" },
295 "autoPort": false
296 }
297 ]
298 }
299 ```
300 </Tab>
301
302 <Tab title="Node.js script">
303 To run a Node.js script directly instead of using a package manager command, use the `program` field:
304
305 ```json theme={null}
306 {
307 "version": "0.0.1",
308 "configurations": [
309 {
310 "name": "server",
311 "program": "server.js",
312 "args": ["--verbose"],
313 "port": 4000
314 }
315 ]
316 }
317 ```
318 </Tab>
319</Tabs>
169 320
170## Environment configuration321## Environment configuration
171 322
172When starting a session, you choose between **Local** (runs on your machine) or **Remote** (runs on Anthropic's cloud).323When starting a session, you choose between three environments:
324
325* **Local**: runs on your machine with direct access to your files
326* **Remote**: runs on Anthropic's cloud infrastructure. Sessions continue even if you close the app.
327* **SSH**: runs on a remote machine you connect to over SSH, such as your own servers, cloud VMs, or dev containers
328
329### Local sessions
330
331Local sessions inherit environment variables from your shell. If you need additional variables, set them in your shell profile, such as `~/.zshrc` or `~/.bashrc`, and restart the desktop app. See [environment variables](/en/settings#environment-variables) for the full list of supported variables.
332
333[Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. To disable thinking entirely, set `MAX_THINKING_TOKENS=0` in your shell profile. On Opus, `MAX_THINKING_TOKENS` is ignored except for `0` because adaptive reasoning controls thinking depth instead.
334
335### Remote sessions
336
337Remote sessions continue in the background even if you close the app. Usage counts toward your [subscription plan limits](/en/costs) with no separate compute charges.
338
339You can create custom cloud environments with different network access levels and environment variables. Select the environment dropdown when starting a remote session and choose **Add environment**. See [cloud environments](/en/claude-code-on-the-web#cloud-environment) for details on configuring network access and environment variables.
340
341### SSH sessions
342
343SSH sessions let you run Claude Code on a remote machine while using the desktop app as your interface. This is useful for working with codebases that live on cloud VMs, dev containers, or servers with specific hardware or dependencies.
173 344
174**Local sessions** inherit environment variables from your shell. If you need additional variables, set them in your shell profile (`~/.zshrc`, `~/.bashrc`) and restart the desktop app. See [environment variables](/en/settings#environment-variables) for the full list of supported variables.345To add an SSH connection, click the environment dropdown before starting a session and select **+ Add SSH connection**. The dialog asks for:
175 346
176[Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. The thinking process runs in the background but isn't displayed in the Desktop interface. To disable it or adjust the budget, set `MAX_THINKING_TOKENS` in your shell profile (use `0` to disable).347* **Name**: a friendly label for this connection
348* **SSH Host**: `user@hostname` or a host defined in `~/.ssh/config`
349* **SSH Port**: defaults to 22 if left empty, or uses the port from your SSH config
350* **Identity File**: path to your private key, such as `~/.ssh/id_rsa`. Leave empty to use the default key or your SSH config.
177 351
178**Remote sessions** run on Anthropic's cloud infrastructure and continue even if you close the app. Usage counts toward your subscription plan limits with no separate compute charges. See [Claude Code on the web](/en/claude-code-on-the-web) for details on configuring remote environments.352Once added, the connection appears in the environment dropdown. Select it to start a session on that machine. Claude runs on the remote machine with access to its files and tools.
179 353
180## How Desktop relates to CLI354Claude Code must be installed on the remote machine. Once connected, SSH sessions support permission modes, connectors, plugins, and MCP servers.
181 355
182If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each maintains separate session history, but they share configuration and project memory (CLAUDE.md files).356## Enterprise configuration
357
358Organizations on Teams or Enterprise plans can manage desktop app behavior through admin console controls, managed settings files, and device management policies.
359
360### Admin console controls
361
362These settings are configured through the [admin settings console](https://claude.ai/admin-settings/claude-code):
363
364* **Enable or disable the Code tab**: control whether users in your organization can access Claude Code in the desktop app
365* **Disable Bypass permissions mode**: prevent users in your organization from enabling bypass permissions mode
366* **Disable Claude Code on the web**: enable or disable remote sessions for your organization
367
368### Managed settings
369
370Managed settings override project and user settings and apply when Desktop spawns CLI sessions. You can set these keys in your organization's [managed settings](/en/settings#settings-precedence) file or push them remotely through the admin console.
371
372| Key | Description |
373| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
374| `disableBypassPermissionsMode` | set to `"disable"` to prevent users from enabling Bypass permissions mode. See [managed settings](/en/permissions#managed-only-settings). |
375
376For the complete list of managed-only settings including `allowManagedPermissionRulesOnly` and `allowManagedHooksOnly`, see [managed-only settings](/en/permissions#managed-only-settings).
377
378Remote managed settings uploaded through the admin console currently apply to CLI and IDE sessions only. For Desktop-specific restrictions, use the admin console controls above.
379
380### Device management policies
381
382IT teams can manage the desktop app through MDM on macOS or group policy on Windows. Available policies include enabling or disabling the Claude Code feature, controlling auto-updates, and setting a custom deployment URL.
383
384* **macOS**: configure via `com.anthropic.Claude` preference domain using tools like Jamf or Kandji
385* **Windows**: configure via registry at `SOFTWARE\Policies\Claude`
386
387### Authentication and SSO
388
389Enterprise organizations can require SSO for all users. See [authentication](/en/authentication) for plan-level details and [Setting up SSO](https://support.claude.com/en/articles/13132885-setting-up-single-sign-on-sso) for SAML and OIDC configuration.
390
391### Data handling
392
393Claude Code processes your code locally in local sessions or on Anthropic's cloud infrastructure in remote sessions. Conversations and code context are sent to Anthropic's API for processing. See [data handling](/en/data-usage) for details on data retention, privacy, and compliance.
394
395### Deployment
396
397Desktop can be distributed through enterprise deployment tools:
398
399* **macOS**: distribute via MDM such as Jamf or Kandji using the `.dmg` installer
400* **Windows**: deploy via MSIX package or `.exe` installer. See [Deploy Claude Desktop for Windows](https://support.claude.com/en/articles/12622703-deploy-claude-desktop-for-windows) for enterprise deployment options including silent installation
401
402For network configuration such as proxy settings, firewall allowlisting, and LLM gateways, see [network configuration](/en/network-config).
403
404For the full enterprise configuration reference, see the [enterprise configuration guide](https://support.claude.com/en/articles/12622667-enterprise-configuration).
405
406## Coming from the CLI?
407
408If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each maintains separate session history, but they share configuration and project memory via CLAUDE.md files.
409
410To move a CLI session into Desktop, run `/desktop` in the terminal. Claude saves your session and opens it in the desktop app, then exits the CLI. This command is available on macOS and Windows only.
411
412<Tip>
413 When to use Desktop vs CLI: use Desktop when you want visual diff review, file attachments, or session management in a sidebar. Use the CLI when you need scripting, automation, third-party providers, or prefer a terminal workflow.
414</Tip>
183 415
184### CLI flag equivalents416### CLI flag equivalents
185 417
186If you're used to CLI flags, the table below shows the Desktop equivalent for each. Some flags have no Desktop equivalent because they're designed for scripting or automation.418This table shows the desktop app equivalent for common CLI flags. Flags not listed have no desktop equivalent because they are designed for scripting or automation.
187 419
188| CLI | Desktop equivalent |420| CLI | Desktop equivalent |
189| ------------------------------------- | ---------------------------------------------- |421| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
190| `--model sonnet` | **...** menu > Model (before starting session) |422| `--model sonnet` | model dropdown next to the send button, before starting a session |
191| `--resume`, `--continue` | Click a session in the sidebar |423| `--resume`, `--continue` | click a session in the sidebar |
192| `--allowedTools`, `--disallowedTools` | Not available in Desktop |424| `--permission-mode` | mode selector next to the send button |
193| `--dangerously-skip-permissions` | Not available in Desktop |425| `--dangerously-skip-permissions` | Bypass permissions mode. Enable in Settings → Claude Code → "Allow bypass permissions mode". Enterprise admins can disable this setting. |
194| `--print` | Not available (Desktop is interactive) |426| `--add-dir` | add multiple repos with the **+** button in remote sessions |
427| `--allowedTools`, `--disallowedTools` | not available in Desktop |
428| `--verbose` | not available. Check system logs: Console.app on macOS, Event Viewer → Windows Logs → Application on Windows |
429| `--print`, `--output-format` | not available. Desktop is interactive only. |
430| `ANTHROPIC_MODEL` env var | model dropdown next to the send button |
431| `MAX_THINKING_TOKENS` env var | set in shell profile; applies to local sessions. See [environment configuration](#environment-configuration). |
195 432
196### Shared configuration433### Shared configuration
197 434
200* **[CLAUDE.md](/en/memory)** and **CLAUDE.local.md** files in your project are used by both437* **[CLAUDE.md](/en/memory)** and **CLAUDE.local.md** files in your project are used by both
201* **[MCP servers](/en/mcp)** configured in `~/.claude.json` or `.mcp.json` work in both438* **[MCP servers](/en/mcp)** configured in `~/.claude.json` or `.mcp.json` work in both
202* **[Hooks](/en/hooks)** and **[skills](/en/skills)** defined in settings apply to both439* **[Hooks](/en/hooks)** and **[skills](/en/skills)** defined in settings apply to both
203* **[Settings](/en/settings)** in `~/.claude.json` and `~/.claude/settings.json` are shared440* **[Settings](/en/settings)** in `~/.claude.json` and `~/.claude/settings.json` are shared. Permission rules, allowed tools, and other settings in `settings.json` apply to Desktop sessions.
204* **Models** (Sonnet, Opus, Haiku) are available in both (Desktop requires selecting before starting a session)441* **Models**: Sonnet, Opus, and Haiku are available in both. In Desktop, select the model from the dropdown next to the send button before starting a session. You cannot change the model during an active session.
205 442
206<Note>443<Note>
207 MCP servers configured for the **Claude Desktop chat app** (in `claude_desktop_config.json`) are separate from Claude Code. To use MCP servers in Claude Code, configure them in `~/.claude.json` or your project's `.mcp.json` file. See [MCP configuration](/en/mcp#configure-mcp-servers) for details.444 **MCP servers: desktop chat app vs Claude Code**: MCP servers configured for the Claude Desktop chat app in `claude_desktop_config.json` are separate from Claude Code and will not appear in the Code tab. To use MCP servers in Claude Code, configure them in `~/.claude.json` or your project's `.mcp.json` file. See [MCP configuration](/en/mcp#installing-mcp-servers) for details.
208</Note>445</Note>
209 446
210### What's different447### Feature comparison
211 448
212**Desktop adds:**449This table compares core capabilities between the CLI and Desktop. For a full list of CLI flags, see the [CLI reference](/en/cli-reference).
213 450
214* Graphical interface with visual session management451| Feature | CLI | Desktop |
215* Built-in connectors for common integrations452| ----------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
216* Automatic session isolation for Git repositories (each session gets its own worktree)453| Permission modes | all modes including `dontAsk` | Ask permissions, Auto accept edits, Plan mode, and Bypass permissions via Settings |
454| `--dangerously-skip-permissions` | CLI flag | Bypass permissions mode. Enable in Settings → Claude Code → "Allow bypass permissions mode" |
455| [Third-party providers](/en/third-party-integrations) | Bedrock, Vertex, Foundry | not available. Desktop connects to Anthropic's API directly. |
456| [MCP servers](/en/mcp) | configure in settings files | Connectors UI for local and SSH sessions, or settings files |
457| [Plugins](/en/plugins) | `/plugin` command | plugin manager UI |
458| @mention files | text-based | with autocomplete |
459| File attachments | not available | images, PDFs |
460| Session isolation | [`--worktree`](/en/cli-reference) flag | automatic worktrees |
461| Multiple sessions | separate terminals | sidebar tabs |
462| Scripting and automation | [`--print`](/en/cli-reference), [Agent SDK](/en/headless) | not available |
217 463
218**CLI adds:**464### What's not available in Desktop
219 465
220* [Third-party API providers](/en/third-party-integrations) (Bedrock, Vertex, Foundry). If you use these, continue using CLI for those projects.466The following features are only available in the CLI or VS Code extension:
221* [CLI flags](/en/cli-reference) for scripting (`--print`, `--resume`, `--continue`)
222* [Programmatic usage](/en/headless) via the Agent SDK
223 467
224## Troubleshooting468* **Third-party providers**: Desktop connects to Anthropic's API directly. Use the [CLI](/en/quickstart) with Bedrock, Vertex, or Foundry instead.
469* **Linux**: the desktop app is available on macOS and Windows only.
470* **Inline code suggestions**: Desktop does not provide autocomplete-style suggestions. It works through conversational prompts and explicit code changes.
471* **Agent teams**: multi-agent orchestration is available via the [CLI](/en/agent-teams) and [Agent SDK](/en/headless), not in Desktop.
225 472
226Solutions to common issues with the Claude desktop app. For CLI issues, see [CLI troubleshooting](/en/troubleshooting).473## Troubleshooting
227 474
228### Check your version475### Check your version
229 476
230To see which version of the desktop app you're running:477To see which version of the desktop app you're running:
231 478
232* **macOS**: Click **Claude** in the menu bar, then **About Claude**479* **macOS**: click **Claude** in the menu bar, then **About Claude**
233* **Windows**: Click **Help**, then **About**480* **Windows**: click **Help**, then **About**
234 481
235Click the version number to copy it to your clipboard.482Click the version number to copy it to your clipboard.
236 483
237### "Branch doesn't exist yet" when opening in CLI484### 403 or authentication errors in the Code tab
238 485
239Remote sessions can create branches that don't exist on your local machine. Click the branch name in the session toolbar to copy it, then fetch it locally:486If you see `Error 403: Forbidden` or other authentication failures when using the Code tab:
240 487
241```bash theme={null}4881. Sign out and back in from the app menu. This is the most common fix.
242git fetch origin <branch-name>4892. Verify you have an active paid subscription: Pro, Max, Teams, or Enterprise.
243git checkout <branch-name>4903. If the CLI works but Desktop does not, quit the desktop app completely, not just close the window, then reopen and sign in again.
244```4914. Check your internet connection and proxy settings.
245 492
246### "Failed to load session" error493### Blank or stuck screen on launch
247 494
248This error can occur for several reasons:495If the app opens but shows a blank or unresponsive screen:
249 496
250* The selected folder no longer exists or is inaccessible4971. Restart the app.
251* A Git repository requires Git LFS but it's not installed (see [Git LFS errors](#git-lfs-errors))4982. Check for pending updates. The app auto-updates on launch.
252* File permissions prevent access to the project directory4993. On Windows, check Event Viewer for crash logs under **Windows Logs → Application**.
253 500
254Try selecting a different folder or restarting the desktop app.501### "Failed to load session"
255 502
256### App won't quit503If you see `Failed to load session`, the selected folder may no longer exist, a Git repository may require Git LFS that isn't installed, or file permissions may prevent access. Try selecting a different folder or restarting the app.
257 504
258If the desktop app doesn't close properly:505### Session not finding installed tools
259 506
260* **macOS**: Press Cmd+Q. If the app doesn't respond, use Force Quit (Cmd+Option+Esc, select Claude, click Force Quit).507If Claude can't find tools like `npm`, `node`, or other CLI commands, verify the tools work in your regular terminal, check that your shell profile properly sets up PATH, and restart the desktop app to reload environment variables.
261* **Windows**: Use Task Manager (Ctrl+Shift+Esc) to end the Claude process.
262 508
263### Windows installation issues509### Git and Git LFS errors
264 510
265If the installer fails silently or doesn't complete properly:511On Windows, Git is required for the Code tab to start local sessions. If you see "Git is required," install [Git for Windows](https://git-scm.com/downloads/win) and restart the app.
266 512
2671. **PATH not updated**: After installation, open a new terminal window. The PATH updates only apply to new terminal sessions.513If you see "Git LFS is required by this repository but is not installed," install Git LFS from [git-lfs.com](https://git-lfs.com/), run `git lfs install`, and restart the app.
2682. **Concurrent installation error**: If you see an error about another installation in progress but there isn't one, try running the installer as Administrator.
269 514
270### Session not finding installed tools515### MCP servers not working on Windows
271 516
272If Claude can't find tools like `npm`, `node`, or other CLI commands:517If MCP server toggles don't respond or servers fail to connect on Windows, check that the server is properly configured in your settings, restart the app, verify the server process is running in Task Manager, and review server logs for connection errors.
273 518
2741. Verify the tools work in your regular terminal519### App won't quit
2752. Check that your shell profile (`~/.zshrc`, `~/.bashrc`) properly sets up PATH
2763. Restart the desktop app to reload environment variables
277 520
278### MCP servers not working (Windows)521* **macOS**: press Cmd+Q. If the app doesn't respond, use Force Quit with Cmd+Option+Esc, select Claude, and click Force Quit.
522* **Windows**: use Task Manager with Ctrl+Shift+Esc to end the Claude process.
279 523
280If MCP server toggles don't respond or servers fail to connect on Windows:524### Windows-specific issues
281 525
2821. Check that the MCP server is properly configured in your settings526* **PATH not updated after install**: open a new terminal window. PATH updates only apply to new terminal sessions.
2832. Restart the desktop app after making changes527* **Concurrent installation error**: if you see an error about another installation in progress but there isn't one, try running the installer as Administrator.
2843. Verify the MCP server process is running (check Task Manager)528* **ARM64**: Windows ARM64 devices are fully supported.
2854. Review the server logs for connection errors
286 529
287### Git LFS errors530### Cowork tab unavailable on Intel Macs
288 531
289If you see "Git LFS is required by this repository but is not installed," your repository uses Git Large File Storage for large binary files. Install Git LFS before opening this repository:532The Cowork tab requires Apple Silicon (M1 or later) on macOS. On Windows, Cowork is available on all supported hardware. The Chat and Code tabs work normally on Intel Macs.
290 533
2911. Install Git LFS from [git-lfs.com](https://git-lfs.com/)534### "Branch doesn't exist yet" when opening in CLI
2922. Run `git lfs install` in your terminal
2933. Restart the desktop app
294 535
295## Enterprise configuration536Remote sessions can create branches that don't exist on your local machine. Click the branch name in the session toolbar to copy it, then fetch it locally:
537
538```bash theme={null}
539git fetch origin <branch-name>
540git checkout <branch-name>
541```
296 542
297Organizations can disable local Claude Code use in the desktop application with the `isClaudeCodeForDesktopEnabled` [enterprise policy option](https://support.claude.com/en/articles/12622667-enterprise-configuration#h_003283c7cb). Additionally, Claude Code on the web can be disabled in your [admin settings](https://claude.ai/admin-settings/claude-code).543### Still stuck?
298 544
299## Related resources545* Search or file a bug on [GitHub Issues](https://github.com/anthropics/claude-code/issues)
546* Visit the [Claude support center](https://support.claude.com/)
300 547
301* [Claude Code on the web](/en/claude-code-on-the-web): Run remote sessions that continue in the cloud548When filing a bug, include your desktop app version, your operating system, the exact error message, and relevant logs. On macOS, check Console.app. On Windows, check Event Viewer → Windows Logs → Application.
302* [CLI reference](/en/cli-reference): Use Claude Code in your terminal with flags and scripting
303* [Common workflows](/en/common-workflows): Tutorials for debugging, refactoring, testing, and more
304* [Settings reference](/en/settings): Configure Claude Code behavior with settings files
305* [Claude Desktop support](https://support.claude.com/en/collections/16163169-claude-desktop): Help articles for the Chat tab and general desktop app usage
306* [Enterprise configuration](https://support.claude.com/en/articles/12622667-enterprise-configuration): Admin policies for organizational deployments