Skip to main content
Code in Claude Desktop on third-party (3P) is the embedded Claude Code interface. It runs the same Claude Code engine as the standalone CLI, with a graphical session manager, and it inherits your Claude Desktop on 3P configuration automatically.

How configuration propagates

When the app starts a Code session, it translates your Claude Desktop on 3P configuration keys into the equivalent Claude Code settings and passes them to the session. You configure one profile, and Cowork and Code both honor it. Each key reaches Claude Code through one of two mechanisms, and the distinction matters if you also deploy Claude Code’s own managed settings (see the next section).

Always applied

These keys are passed directly to the Claude Code process as environment variables or launch options. They take effect on every Code session and cannot be overridden by user-level Claude Code settings or by a separately deployed managed-settings.json.

Applied as managed policy

These keys are translated into Claude Code managed settings 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. The network and filesystem sandboxes apply on macOS, and on Linux devices and SSH hosts with Claude Code’s sandbox dependencies installed. Claude Code does not sandbox shell commands on Windows devices, and on a Linux device or SSH host without the dependencies commands run unsandboxed with a warning in the session. In those cases, and when neither sandbox key is set, blockReadsOutsideWorkingDirectories still confines Claude’s file tools but can only ask the user to approve shell commands that read outside the working directories or that Claude Code cannot verify. Under 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. 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.

Interaction with Claude Code’s own managed settings

Claude Code can also be configured directly by deploying a managed-settings.json file, an OS configuration profile for Claude Code, or (with Anthropic authentication) server-managed settings. If a device has any of these, Claude Code treats it as the administrator policy and, by default, ignores the policy values Claude Desktop supplies from the Applied as managed policy table. The Always applied keys are unaffected. To 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:
managed-settings.json
With "merge", Claude Desktop’s policy values are layered under your Claude Code policy. Your values win any conflict, deny and allow lists are unioned, and Claude Desktop’s values are filtered so they can only tighten policy, never loosen it. See parentSettingsBehavior in the Claude Code settings reference. Requires Claude Code v2.1.133 or later, which ships with Claude Desktop on 3P. With "merge", two Claude Code policy keys weaken blockReadsOutsideWorkingDirectories. sandbox.filesystem.allowManagedReadPathsOnly limits the block to Claude’s file tools, so a shell command that reads 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.
In a third-party deployment there is no Anthropic authentication, so Claude Code’s server-managed settings tier is never present. If you have not separately deployed a Claude Code managed-settings.json or OS profile, Claude Desktop’s policy applies automatically and you do not need to set parentSettingsBehavior.

Remote sessions over SSH

A Code session can run its Claude Code engine on a remote host over SSH while the session’s interface stays in Claude Desktop on the user’s device. In a 3P deployment this is off until you set sshHostAllowlist, because the app forwards the session’s inference credential to the host. SSH remote sessions lists the credential kinds that work on a remote host and which of the keys above apply there.

Further reading

Disabling Code

To turn off Code, set isClaudeCodeForDesktopEnabled to false in your Claude Desktop on 3P configuration. Users can no longer open Code. Cowork is unaffected, and so is Chat if you have enabled it.