Code in Claude Desktop on 3P changedthird-party/claude-desktop/code
Nearest release: v2.1.332, published 4 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 24 Nov 2026 17:08 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 24 Nov 2026 17:37 UTC.
Upstream edited
Recorded here
Lines+19added
Lines−19removed
From line
37
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits54to this page, all time
The whole hunk
from line 37, old and new numbered
/
from line 37
3737
3838### Applied as managed policy
3939
40These keys are translated into Claude Code [managed settings](https://code.claude.com/docs/en/settings#settings-files) and supplied to the session as policy. They take precedence over user and project settings, but they participate in Claude Code's managed-settings precedence if you have also deployed a separate Claude Code policy.
40These keys are translated into Claude Code [managed settings](https://code.claude.com/docs/en/settings#settings-files) and supplied to the session as policy. They take precedence over user and project settings, but a separate Claude Code policy, if you have deployed one, can replace them.
4141
4242| Claude Desktop on 3P key | Claude Code policy it produces |
4343| - | - |
4444| `coworkEgressAllowedHosts` | A network sandbox restricted to your hosts, `allowManagedDomainsOnly`, and `WebFetch` allow rules for the same hosts, which [don't block other hosts](https://claude.com/docs/third-party/claude-desktop/web-tools.md#how-the-egress-allowlist-applies-in-code-sessions). Claude Code's own inference and telemetry connections run outside the sandbox. A shell command or [HTTP hook](https://code.claude.com/docs/en/hooks#http-hook-fields) that calls your inference provider, `api.anthropic.com`, or your OTLP collector needs that host in the list. |
45| `allowedWorkspaceFolders` | A filesystem sandbox for shell commands, which can then create or change files only inside your allowed roots and the session's temporary locations. Those commands can still read files outside the roots, except where `blockReadsOutsideWorkingDirectories` or a [`Read(…)` rule](#file-path-rules-and-shell-commands) hides them. The roots are also passed as `additionalDirectories` at launch, which is always applied independent of managed-settings precedence. The app also keeps Claude's file tools inside the roots, apart from reads of [plugin files](#plugin-files-under-allowedworkspacefolders) and, in a local session, of Claude Code's own plan files. In **Plan** mode, they can also write those plan files. It refuses to start a Code session outside an allowed root. |
46| `blockReadsOutsideWorkingDirectories` | Claude Code's `permissions.blockReadsOutsideWorkingDirectories` for Code sessions. Claude's file tools refuse to read outside the working directories (the session's folder plus your allowed roots, if any) in every permission mode. Where the sandbox from `allowedWorkspaceFolders` or `coworkEgressAllowedHosts` is running, it also hides the user's home directory and similar locations, such as other users' home folders and mounted volumes, from shell commands. A sandboxed command can't read a hidden location, even after the user approves the command. Without a running sandbox, a shell command that Claude Code recognizes as reading outside the working directories, or whose command line it can't analyze, asks the user for approval first, even in bypass permissions mode. Claude Code can't see what a running script or other program reads. Without a running sandbox, a command such as `python3 report.py` can read outside the working directories with no prompt when the session's permission mode or permission rules allow the command. The key requires Claude Desktop 1.46388.1 or later. The block takes effect only in sessions that run Claude Code v2.1.257 or later; if the app cannot install its current Claude Code engine and a session runs one older than v2.1.257 that is still on the device, that session runs without the block and the app logs a warning. |
47| `managedMcpServers` | `strictPluginOnlyCustomization` set to `["mcp"]`, so the Code session does not load MCP servers that users define on Claude Code's side (`~/.claude.json`, a project's `.mcp.json`, or `claude mcp add`); your managed servers, which the app connects and supplies to the session itself, and MCP servers bundled in plugins still load. Per-tool [`toolPolicy`](https://claude.com/docs/third-party/claude-desktop/configuration#tool-permissions-for-managed-mcp-servers) values on each server are emitted as `permissions.deny` (for `blocked`) or `permissions.ask` (for `ask`) rules against the corresponding `mcp__<server>__<tool>` names. In local Code sessions and Code sessions on an SSH host, `allow` doesn't pre-approve the tool. |
48| `isLocalDevMcpEnabled` | When `false` and `allowedPluginMcpServers` is unset, an `allowedMcpServers` list that admits only remote servers, with `allowManagedMcpServersOnly`, whether or not `managedMcpServers` is set. The Code session refuses local (stdio) servers bundled in plugins from marketplaces or that users install themselves, and local servers that users define on Claude Code's side (`~/.claude.json`, a project's `.mcp.json`, or `claude mcp add`). Those plugins' remote servers still connect. Your managed servers and the servers from the organization plugins directory, which the app connects and supplies to the session itself, aren't subject to the list. |
45| `allowedWorkspaceFolders` | A filesystem sandbox for shell commands, which can then create or change files only inside your allowed roots and the session's temporary locations. Those commands can still read files outside the roots, except where `blockReadsOutsideWorkingDirectories` or a [`Read(…)` rule](#file-path-rules-and-shell-commands) hides them. The roots are also passed as `additionalDirectories` at launch, which is always applied independent of managed-settings precedence. The app also keeps Claude's file tools inside the roots, apart from reads of [plugin files](#plugin-files-under-allowedworkspacefolders) and, in a local session, of Claude Code's own plan files. In **Plan** mode, Claude's file tools can also write those plan files. The app refuses to start a Code session outside an allowed root. |
46| `blockReadsOutsideWorkingDirectories` | Claude Code's `permissions.blockReadsOutsideWorkingDirectories` for Code sessions. Claude's file tools refuse to read outside the working directories (the session's folder plus your allowed roots, if any) in every permission mode. Where the sandbox from `allowedWorkspaceFolders` or `coworkEgressAllowedHosts` is running, it also hides the user's home directory and similar locations, such as other users' home folders and mounted volumes, from shell commands. A sandboxed command can't read a hidden location, even after the user approves the command. Without a running sandbox, a shell command that Claude Code recognizes as reading outside the working directories, or whose command line it can't analyze, asks the user for approval first, even in bypass permissions mode. Claude Code can't see what a running script or other program reads. Without a running sandbox, a command such as `python3 report.py` can read outside the working directories with no prompt when the session's permission mode or permission rules allow the command. The key requires Claude Desktop 1.46388.1 or later. The block takes effect only in sessions that run Claude Code v2.1.257 or later. If the app cannot install its current Claude Code engine, and a session runs an engine older than v2.1.257 that is still on the device, that session runs without the block and the app logs a warning. |
47| `managedMcpServers` | `strictPluginOnlyCustomization` set to `["mcp"]`, so the Code session does not load MCP servers that users define on Claude Code's side (`~/.claude.json`, a project's `.mcp.json`, or `claude mcp add`). Your managed servers, which the app connects and supplies to the session itself, and MCP servers bundled in plugins still load. Per-tool [`toolPolicy`](https://claude.com/docs/third-party/claude-desktop/configuration#tool-permissions-for-managed-mcp-servers) values on each server become `permissions.deny` (for `blocked`) or `permissions.ask` (for `ask`) rules against the corresponding `mcp__<server>__<tool>` names. In local Code sessions and Code sessions on an SSH host, `allow` doesn't pre-approve the tool. |
48| `isLocalDevMcpEnabled` | When `false` and `allowedPluginMcpServers` is unset, an `allowedMcpServers` list that admits only remote servers, with `allowManagedMcpServersOnly`, whether or not `managedMcpServers` is set. The Code session refuses local (stdio) servers bundled in plugins from marketplaces, or in plugins users install themselves, and local servers that users define on Claude Code's side (`~/.claude.json`, a project's `.mcp.json`, or `claude mcp add`). Those plugins' remote servers still connect. Your managed servers and the servers from the organization plugins directory, which the app connects and supplies to the session itself, aren't subject to the list. |
4949| `allowedPluginMcpServers` | `strictPluginOnlyCustomization` set to `["mcp"]` together with an `allowedMcpServers` list holding your entries and `allowManagedMcpServersOnly`, whether or not `managedMcpServers` is set. MCP servers bundled in plugins from marketplaces, or in plugins users install themselves, connect only when their URL matches an entry; no such plugin's local (stdio) server is admitted, and an empty list admits none. Your managed servers and the servers from the organization plugins directory still load. |
5050| `deniedPluginMcpServers` | The app sets a `deniedMcpServers` list holding your entries, whether or not `allowedPluginMcpServers` is set. When the key is unset or its list is empty, the app sets no `deniedMcpServers` list. When the value is not a list, or holds an entry that the app can't read, the app sets a list whose one entry is `*`, a pattern that matches every URL. See the [`deniedPluginMcpServers` reference](https://claude.com/docs/third-party/claude-desktop/configuration#deniedpluginmcpservers) for what the setting does and what an entry matches. |
5151| `userPluginMarketplacesEnabled` | When `false`, a `strictKnownMarketplaces` allowlist. See [Controlling user extensions](https://claude.com/docs/third-party/claude-desktop/extensions.md#controlling-user-extensions) for what the key does. |
from line 64
6464>
6565> Even where the sandbox runs, [hooks that run a command](https://code.claude.com/docs/en/hooks#hook-handler-fields), local (stdio) MCP servers, and [Claude Code mods](#claude-code-mods) run outside it, and so do the [other processes that Claude Code starts](https://code.claude.com/docs/en/sandboxing#what-runs-outside-the-sandbox). All of these can reach hosts outside `coworkEgressAllowedHosts`, change files outside `allowedWorkspaceFolders`, and read files that `blockReadsOutsideWorkingDirectories` hides from shell commands. To limit which hooks, local MCP servers, and mods run, follow [Turn off user hooks](https://claude.com/docs/third-party/claude-desktop/extensions.md#turn-off-user-hooks) and [Stop user-installed mods from loading](#stop-user-installed-mods-from-loading), and set [`isLocalDevMcpEnabled`](https://claude.com/docs/third-party/claude-desktop/configuration#islocaldevmcpenabled) to `false`.
6666
67Under `blockReadsOutsideWorkingDirectories`, sandboxed shell commands can still read system locations such as `/usr`, the session's plugin and attachment folders (which become read-only), and the user's git configuration files (`~/.gitconfig` and the `config`, `ignore`, and `attributes` files under `~/.config/git`), which can themselves hold credentials such as tokens in remote URLs. Other files under the home folder outside the working directories are hidden from them, including `~/.ssh`, stored git credentials, included git configuration files, signing keys, and the target of a symlinked git configuration file, so git operations that need those files fail in the session until the user re-opens the paths. In a local session Claude also cannot read a file attached or `@`-mentioned from outside the working directories, so users should move such files into the session's folder or an allowed folder first.
67Under `blockReadsOutsideWorkingDirectories`, sandboxed shell commands can still read system locations such as `/usr`, the session's plugin and attachment folders (which become read-only), and the user's git configuration files (`~/.gitconfig` and the `config`, `ignore`, and `attributes` files under `~/.config/git`), which can themselves hold credentials such as tokens in remote URLs. Other files under the home folder outside the working directories are hidden from those commands, including `~/.ssh`, stored git credentials, included git configuration files, signing keys, and the target of a symlinked git configuration file. Git operations that need those files therefore fail in the session until the user re-opens the paths in their own Claude Code settings. In a local session Claude also cannot read a file attached or `@`-mentioned from outside the working directories, so users should move such files into the session's folder or an allowed folder first.
6868
6969In **Manual** and **Accept edits** modes, many sandboxed shell commands ask the user first, because they go through Claude Code's regular permission flow. Claude Code's [`sandbox.autoAllowBashIfSandboxed`](https://code.claude.com/docs/en/settings-reference#sandbox-autoallowbashifsandboxed) setting is off by default. When it's `true`, most sandboxed commands run without asking. Claude Code managed settings can replace the sandbox and other policy values that Claude Desktop supplies. Before you set `sandbox.autoAllowBashIfSandboxed` in those settings, read [Interaction with Claude Code's own managed settings](#interaction-with-claude-code%E2%80%99s-own-managed-settings).
7070
71While `blockReadsOutsideWorkingDirectories` is on and `sandbox.autoAllowBashIfSandboxed` is off, a sandboxed command that reads outside the working directories can ask for approval first, [even in bypass permissions mode](https://code.claude.com/docs/en/permission-modes#actions-no-mode-auto-approves). An allowed root that is or contains the home directory, such as `~` or `/Users`, leaves the home directory readable, so list folders below it. The block guards against content a session reads steering Claude into the user's files, not against the user, who can re-open any path, up to their whole home folder, with `sandbox.filesystem.allowRead` (shell commands) or `permissions.additionalDirectories` (file tools and shell commands) in their own Claude Code settings, while a settings file tracked in a git repository cannot.
71While `blockReadsOutsideWorkingDirectories` is on and `sandbox.autoAllowBashIfSandboxed` is off, a sandboxed command that reads outside the working directories can ask for approval first, [even in bypass permissions mode](https://code.claude.com/docs/en/permission-modes#actions-no-mode-auto-approves). An allowed root that is or contains the home directory, such as `~` or `/Users`, leaves the home directory readable, so list folders below it. A session can read content that steers Claude into the user's files, and the block guards against that. It doesn't guard against the user. In their own Claude Code settings, the user can re-open any path, up to their whole home folder, with `sandbox.filesystem.allowRead` (shell commands) or `permissions.additionalDirectories` (file tools and shell commands). A settings file tracked in a git repository can't re-open a path.
7272
7373### Plugin files under `allowedWorkspaceFolders`
7474
from line 98
9898
9999Claude Code can also be configured directly by deploying a [`managed-settings.json` file](https://code.claude.com/docs/en/settings#settings-files), an OS configuration profile for Claude Code, or, with the Claude API as the inference provider, [server-managed settings](https://code.claude.com/docs/en/server-managed-settings). If a Code session has any of these, Claude Code treats it as the administrator policy. By default, Claude Code then **ignores** the [managed policy](#applied-as-managed-policy) values that Claude Desktop supplies, except in a Code session that gets [`code` settings from a Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway-config#apply-code-settings-in-the-code-tab). The [Always applied](#always-applied) keys are unaffected.
100100
101In such a session, the gateway's `code` settings are the administrator policy, and `parentSettingsBehavior` defaults to `"merge"`. Set it in those `code` settings rather than rely on the default: `"merge"` to keep Claude Desktop's policy values, `"first-wins"` to drop them. To keep them, also set `"merge"` in the Claude Code managed settings on each device, because a session that starts without the gateway's `code` settings follows the device's settings instead.
101In a session that gets a Claude apps gateway's `code` settings, those settings are the administrator policy, and `parentSettingsBehavior` defaults to `"merge"`. Set it in those `code` settings rather than rely on the default: `"merge"` to keep Claude Desktop's policy values, `"first-wins"` to drop them. To keep them, also set `"merge"` in the Claude Code managed settings on each device, because a session that starts without the gateway's `code` settings follows the device's settings instead.
102102
103To have Claude Desktop's restrictions apply on top of your Claude Code policy, set `parentSettingsBehavior` to `"merge"` in the Claude Code managed settings you deploy:
103To have Claude Desktop's restrictions apply in addition to your Claude Code policy, set `parentSettingsBehavior` to `"merge"` in the Claude Code managed settings you deploy:
104104
105105```json managed-settings.json theme={null}
106106{
from line 108
108108}
109109```
110110
111With `"merge"`, Claude Desktop's policy values are layered under your Claude Code policy. For how Claude Code combines the two policies, see [Let an embedding host add policy](https://code.claude.com/docs/en/managed-settings#let-an-embedding-host-add-policy) in the Claude Code documentation. Requires Claude Code v2.1.133 or later, which ships with Claude Desktop on 3P.
111With `"merge"`, Claude Desktop's policy values are layered under your Claude Code policy. For how Claude Code combines the two policies, see [Let an embedding host add policy](https://code.claude.com/docs/en/managed-settings#let-an-embedding-host-add-policy) in the Claude Code documentation. Requires Claude Code v2.1.133 or later, which Claude Desktop on 3P includes.
112112
113With `"merge"`, two Claude Code policy keys weaken `blockReadsOutsideWorkingDirectories`. `sandbox.filesystem.allowManagedReadPathsOnly` limits the block to Claude's file tools, so a shell command that Claude Code recognizes as reading outside the working directories asks for approval instead of failing, and `allowManagedPermissionRulesOnly` removes the session's read access to its plugin and attachment folders, so skills that read their own files stop working. Leave both out of your Claude Code policy if you rely on the block.
113With `"merge"`, two Claude Code policy keys weaken `blockReadsOutsideWorkingDirectories`. `sandbox.filesystem.allowManagedReadPathsOnly` limits the block to Claude's file tools, so a shell command that Claude Code recognizes as reading outside the working directories asks for approval instead of failing. `allowManagedPermissionRulesOnly` removes the session's read access to its plugin and attachment folders, so skills that read their own files stop working. Leave both out of your Claude Code policy if you rely on the block.
114114
115115> [!NOTE]
116116>
from line 120
120120
121121### Policy status on the device
122122
123Claude Desktop checks whether Claude Code managed settings replace your policy on the device. Each time it starts Claude Code on the device for a Code, Cowork, or Chat session, it asks Claude Code whether it applies the [managed policy](#applied-as-managed-policy) values that Claude Desktop sent. A session over SSH has [its own check](https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions.md#policy-status-on-the-remote-host), and a WSL session has none. Requires Claude Desktop 5.1231.0 or later.
123Claude Desktop checks whether Claude Code managed settings replace your policy on the device. Each time it starts Claude Code on the device for a Code, Cowork, or Chat session, it asks Claude Code whether Claude Code applies the [managed policy](#applied-as-managed-policy) values that Claude Desktop sent. A session over SSH has [its own check](https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions.md#policy-status-on-the-remote-host), and a WSL session has none. Requires Claude Desktop 5.1231.0 or later.
124124
125125If Claude Code answers no, the session continues. Cowork and Chat sessions show no message. A Code session shows a message that begins with these words:
126126
from line 130
130130
131131Claude Desktop also reports that answer outside the session:
132132
133* **On the device**: Claude Desktop writes a warning that names the affected session types and the fix to `main.log` in the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) and to the [diagnostic report](https://claude.com/docs/third-party/claude-desktop/installation.md#troubleshooting).
133* **On the device**: Claude Desktop writes a warning to `main.log` in the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) and to the [diagnostic report](https://claude.com/docs/third-party/claude-desktop/installation.md#troubleshooting). The warning names the affected session types and the fix.
134134* **On your collector**: if you set [`otlpEndpoint`](https://claude.com/docs/third-party/claude-desktop/configuration#otlpendpoint), you receive a `desktop_local_policy_check_failed` event under the `service.name` value `claude-desktop`, unless you set [`otlpDesktopLogLevel`](https://claude.com/docs/third-party/claude-desktop/configuration#otlpdesktoploglevel) to `off`.
135135
136To have your Claude Desktop policy apply on the device, change what supplies its Claude Code managed settings:
136To have your Claude Desktop policy apply on the device, make a change in whichever of these supplies the device's Claude Code managed settings:
137137
138138* **A `managed-settings.json` file, a configuration profile, a registry policy, or server-managed settings**: set `parentSettingsBehavior` to `"merge"` in each one that holds your Claude Code policy. Claude Code reads the key only from [the highest-priority one](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources) that the session uses. See [Interaction with Claude Code's own managed settings](#interaction-with-claude-code%E2%80%99s-own-managed-settings).
139139* **A [`policyHelper`](https://code.claude.com/docs/en/settings-reference#policyhelper)**: put the limits from your Claude Desktop policy in what the helper returns. Claude Code never merges Claude Desktop's values with a helper's output. It still answers no, and the message, the warning, and the event keep appearing.
from line 169
169169A session doesn't start if Claude Desktop can't use the launcher you named. For example:
170170
171171* **The launcher file or value**: the file is missing or isn't executable, or the value doesn't follow Claude Code's [launcher value format](https://code.claude.com/docs/en/corporate-launcher#format-of-the-launcher-value).
172* **The `--version` run on an SSH host**: Claude Desktop's [remote server](https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions.md#how-a-remote-session-works) on the host runs the launcher with the Claude Code engine's path and `--version`. It does so, with a time limit, when Claude Desktop places the engine on the host or checks the one that is there. Have the launcher run that path with `--version` and exit with Claude Code's status. Claude Desktop hands this run none of the variables that it sets for a session, such as `ANTHROPIC_BASE_URL`, so the launcher must not fail this run because they are missing. If the run doesn't end with status 0 within the limit, the session doesn't start. If the run failed before the limit, Claude Desktop shows the card `Your organization's launcher on <host> didn't start Claude Code during setup`.
172* **The `--version` run on an SSH host**: Claude Desktop's [remote server](https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions.md#how-a-remote-session-works) on the host runs the launcher with the Claude Code engine's path and `--version`. It does so, with a time limit, when Claude Desktop places the engine on the host or checks the one that is there. Have the launcher run that path with `--version` and exit with Claude Code's status. Claude Desktop passes this run none of the variables that it sets for a session, such as `ANTHROPIC_BASE_URL`, so the launcher must not fail this run because they are missing. If the run doesn't end with status 0 within the limit, the session doesn't start. If the run failed before the limit, Claude Desktop shows the card `Your organization's launcher on <host> didn't start Claude Code during setup`.
173173
174174#### Devices that skip the corporate launcher
175175
from line 286
286286
287287### Run vetted connector tools without classifier review
288288
289In Cowork's [**Automatically approve**](https://claude.com/docs/third-party/claude-desktop/configuration.md#automodeenabled), the safety classifier reviews Claude's calls to a connector tool whose [`toolPolicy`](https://claude.com/docs/third-party/claude-desktop/configuration#tool-permissions-for-managed-mcp-servers) in `managedMcpServers` is `"allow"`, and can block them. To run a tool without that review, add a `permissions.allow` rule for it to your Claude Code managed settings, beside any `autoMode` block:
289In Cowork's [**Automatically approve**](https://claude.com/docs/third-party/claude-desktop/configuration.md#automodeenabled) mode, the safety classifier reviews Claude's calls to a connector tool whose [`toolPolicy`](https://claude.com/docs/third-party/claude-desktop/configuration#tool-permissions-for-managed-mcp-servers) in `managedMcpServers` is `"allow"`, and can block them. To run a tool without that review, add a `permissions.allow` rule for it to your Claude Code managed settings, beside any `autoMode` block:
290290
291291```json managed-settings.json theme={null}
292292{
from line 322
322322
323323Your policy also applies to mods in [plugins from your marketplaces](https://claude.com/docs/third-party/claude-desktop/extensions.md#plugin-marketplaces-admin). For a tool that a mod must never call, even with the user's approval, block the tool.
324324
325In **Auto mode** and in Cowork's **Automatically approve**, the safety classifier doesn't review a mod's calls, so your [Auto mode rules](#tune-the-auto-mode-classifier) don't apply to them.
325In **Auto mode** and in Cowork's **Automatically approve** mode, the safety classifier doesn't review a mod's calls, so your [Auto mode rules](#tune-the-auto-mode-classifier) don't apply to them.
326326
327327Your tool policies don't cover what a mod or a hook does without calling a tool. To control that, limit which mods and hooks run: see [Stop user-installed mods from loading](#stop-user-installed-mods-from-loading) and [Turn off user hooks](https://claude.com/docs/third-party/claude-desktop/extensions.md#turn-off-user-hooks). To limit which plugins users can add, see [Controlling user extensions](https://claude.com/docs/third-party/claude-desktop/extensions.md#controlling-user-extensions).
328328
No line in this hunk matches that.