To set up Claude Code in the terminal, see Manage Claude Code in the terminal from the Enterprise Admin Console.
Console settings that Claude Code follows
This table shows the fields under Organization settings > Desktop 3P that Claude Code follows:
If you block an MCP server that the developer added and that’s already running, the server keeps answering in that session.
Claude Code settings as JSON
The JSON on the Claude Code page has the same format asmanaged-settings.json, but Claude Code applies only a fixed list of its settings. For what the JSON can’t do, and how to enter it, see Add Claude Code settings as JSON.
Settings that Claude Code applies
This table shows the main settings that Claude Code applies. For what each one does, see the settings reference.
Claude Code ignores every setting that isn’t on its list, such as
permissions.allow, permissions.defaultMode, model, forceLoginOrgUUID, requiredMinimumVersion, and cleanupPeriodDays. It also ignores a switch that loosens a limit, such as disableWorkflows: false.
Some settings have conditions:
- Sandbox settings: these apply when the sandbox is on. Your JSON can’t turn it on, but Allowed egress hosts, the computer’s managed settings, or a developer’s own settings can.
- OpenTelemetry export: your JSON can’t turn the export on. To turn it on, fill in OTLP endpoint on the Telemetry & updates page. See Where data goes.
permissions.ask: if a developer setssandbox.autoAllowBashIfSandboxedtotrue, aBashrule with no pattern, such asBashorBash(*), stops asking for sandboxed commands. To keep the rule asking, set that key tofalsein your JSON.- A switch or a group with a value that Claude Code can’t read, such as
"disableBypassPermissionsMode": "allow"inpermissions: for most of these, Claude Code applies the strictest value. In this example, bypass permissions mode stays blocked for every developer until you correct the value. - A deny setting that isn’t a list, such as
"deniedModels": 5: it denies nothing - A setting that a group’s policy also sets: in the JSON, lists such as
permissions.denyadd together, so a policy can’t remove an organization-wide deny rule. A single value, or the wholeallowedMcpServerslist, comes from the highest-ranked policy that sets it. A console field in a policy replaces the organization-wide value.
Settings that run commands
hooks and statusLine run commands on the developer’s computer. Claude Code applies the two settings as managed settings and doesn’t ask the developer first. To enter them, see Add hooks and a status line as JSON.
The two settings require Claude Code 2.1.336 or later. Earlier versions ignore them and still use your connection.
A computer applies the two settings only if it accepts your organization’s commands:
- A computer with no managed settings, or whose managed settings don’t name your organization in
forceLoginOrgUUID: the computer accepts your organization’s commands in a user account if no other organization’s commands ran in that account in the last 30 days.allowedAdminConsoleOrgUUIDsdoesn’t change this. - A computer whose managed settings name your organization in
forceLoginOrgUUID: the computer accepts your organization’s commands - A computer that doesn’t accept your organization’s commands: neither setting applies.
/statusin Claude Code says that Claude Coderuns commands only from the organization whose commands ran here first. If your JSON setshooks, Claude Code also doesn’t use your connection at the next start. In that case, Claude Code doesn’t start unless the developer or the computer sets a provider, and its message gives the same cause.
- Name the new organization in
forceLoginOrgUUID: add it to the computer’s managed settings, as described in Keep managed settings beside the console. On a computer that also runs Claude Desktop on your provider, put"parentSettingsBehavior": "merge"next to it. - Delete the file
~/.claude/state/hybrid-organization-lock.json: delete it in the developer’s user account on the computer
- The computer’s managed settings: the computer’s hooks and your hooks both run. The computer’s status line doesn’t apply, even if you set none.
- The developer’s own settings: the developer’s hooks also run, unless you set
allowManagedHooksOnly. The developer’sdisableAllHooksdoesn’t stop your hooks. Your status line shows in place of the developer’s status line. Your status line shows in the terminal. The VS Code panel has no status line. - The sandbox: a hook can approve a tool call. Claude Code then runs the call without asking the developer, unless a deny or ask rule matches the call.
sandbox.enabledin your JSON doesn’t turn the sandbox on. Unless something else turns the sandbox on, a Bash command that your hook approves runs outside it. To turn the sandbox on, list hosts in Allowed egress hosts, with no*entry, or use the computer’s managed settings. On native Windows, or where the sandbox can’t start, a Bash command that your hook approves runs outside the sandbox, whichever setting turns it on. A command that the developer excludes from the sandbox also runs outside it. - A group’s policy: hooks in a policy add to the organization-wide ones.
disableAllHooksset totruein a policy turns off your hooks and status line for that group. It also turns off the developers’ own hooks and status lines. The computer’s hooks still run. - Gateway-managed Claude Code: if the switch is on with Interactive sign-in and no identity provider, the gateway’s own settings apply after a developer runs
/loginin Claude Code. Neither setting then applies, on any computer.
Credentials and gateways
While a terminal uses your connection, the developer’s own Claude login or API key doesn’t go to the gateway. Check these settings before developers sign in:- Helper scripts: Claude Code checks the Helper script on your Connection page and the OTLP headers helper script on your Telemetry & updates page before it runs them. To install them, see Install the helper for Claude Code in the terminal.
- A gateway or base URL that Claude Code can’t use: Claude Code in the terminal doesn’t use your connection if, for example, the Helper script is missing from the computer, or your gateway’s sign-in flow is
brokerand you haven’t allowed browser sign-in./statusin Claude Code names the setting. The session then uses the provider and the credentials that are set on the computer. These can be the developer’s own Claude login or API key, even whenANTHROPIC_BASE_URLon the computer is your gateway’s address. If nothing on the computer sets a provider, Claude Code doesn’t start. In that case, it doesn’t send prompts to the Anthropic API with the developer’s own login or key. - Gateway-managed Claude Code: if the console doesn’t show this switch, it’s off. With an identity provider, the switch changes nothing in a terminal. If the switch is on with Interactive sign-in and no identity provider, a provider that the developer or the computer set stays in use until the developer runs
/loginin Claude Code. After that, the session follows the gateway’s own settings, and none of your console settings apply. In that setup, on a computer whoseforceLoginOrgUUIDlists your organization, Claude Code doesn’t sign in to the gateway. It refuses prompts there unless the developer or the computer set a provider orANTHROPIC_BASE_URL.
Managed settings beside the console
If you keep managed settings beside the console, this is how the two sets of settings combine while a developer is signed in:- Many settings persist: these include cloud credentials, proxy variables in
env, model names, hooks, required versions, managed MCP servers, and plugins - Your connection replaces these
envvalues: the cloud provider, region, project, resource, provider base URL, and custom request headers. If you have a Model list, it replacesavailableModels. - Addresses for your hooks, MCP servers, and credential helpers: these programs don’t get your gateway’s address. They also don’t get a base URL that isn’t your cloud provider’s own service address. They get the address that the managed settings or the developer set, or no address. Versions before 2.1.336 give these programs your gateway’s address.
- If a program needs your address: set the address in the managed
env, for example asANTHROPIC_BASE_URLfor a gateway - If a program starts
claudewith--bareor with another configuration directory: thatclaudesends its requests to the address that the managed settings, the project’s settings, or the developer set, or else to the Anthropic API or the cloud provider’s default address. WithenforceAnthropicSignIn, Claude Code refuses thatclaude.
- If a program needs your address: set the address in the managed
- Your collector replaces the computer’s: if you filled in OTLP endpoint, OpenTelemetry data goes only to your collector. Your OTLP fields replace the computer’s OpenTelemetry address, protocol, resource attributes, and content settings.
CLAUDE_CODE_ENABLE_TELEMETRYset to0on the computer doesn’t turn off the export. To turn it off, use the JSON.OTEL_LOG_ASSISTANT_RESPONSESset to0on the computer still applies, with the limits under Content capture. - Certificates for your collector: exports to your collector don’t use
OTEL_EXPORTER_OTLP_CERTIFICATE,OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE, orOTEL_EXPORTER_OTLP_CLIENT_KEY, even over gRPC. UseNODE_EXTRA_CA_CERTSfor a private CA, andCLAUDE_CODE_CLIENT_CERTandCLAUDE_CODE_CLIENT_KEYfor a client certificate. - These stop applying, and you can enter them in the console:
companyAnnouncements,allowedMcpServersif you set it withoutallowManagedMcpServersOnly, andstatusLine - These stop applying, and the console can’t set them:
permissions.allow, the default permission mode, added directories,skillOverrides,claudeMdExcludes,autoMemoryEnabled, and display preferences. The developer’s own settings decide these. A skill that you turned off withskillOverridesis available again. - Your proxy for sandboxed commands stops applying: Claude Code ignores
sandbox.network.httpProxyPortandsandbox.network.socksProxyPortin the computer’s managed settings. The console can’t set them. Sandboxed commands no longer go through your proxy. To limit the hosts that sandboxed commands reach, use Allowed egress hosts. - These apply together with your console settings:
permissions.deny,permissions.ask,deniedModels,deniedMcpServers,disabledMcpjsonServers,sandbox.network.deniedDomains,sandbox.filesystem.denyRead,sandbox.filesystem.denyWrite, blocked marketplaces, and Auto mode’s deny rules sandbox.filesystem.allowReadpersists: sandboxed commands can read the paths in that list, even if your console settings deny them- The stricter value applies: switches that only restrict, such as
permissions.disableBypassPermissionsMode,allowManagedHooksOnly, andsandbox.enabled
Managed settings that conflict with the console
Check the computer’s managed settings for these:- A private endpoint: the managed settings can give Claude Code a private address for your provider, such as
ANTHROPIC_BEDROCK_BASE_URLfor a VPC endpoint. Your connection overrides that address, so if the provider’s base URL field on the Connection page is empty, requests go to the provider’s default address. To keep the private address, enter it in that field, such as Bedrock base URL. Claude Desktop and Claude Code then use that address. - The same base URL in the managed settings: if the managed settings set the same address as your base URL, remove
ANTHROPIC_CUSTOM_HEADERSandCLAUDE_CODE_SKIP_BEDROCK_AUTH, or the same variable for your provider, from them. Otherwise, Claude Code doesn’t use your connection. - A cloud credential in the managed settings: Claude Code doesn’t use your connection if your base URL isn’t your cloud provider’s own service address and the managed settings set a cloud credential, such as
AWS_ACCESS_KEY_IDorGOOGLE_APPLICATION_CREDENTIALS. A VPC endpoint counts as the provider’s own service address. On Microsoft Foundry, no base URL counts as the provider’s own service address./statusin Claude Code names the credential. To fix the problem, do one of these, and then ask developers to start Claude Code again:- Remove the credential from the managed settings: sessions, background jobs, and programs that already have the credential can keep using it, also at your base URL. If the credential must stop working on developers’ computers, also revoke it at your cloud provider.
- Set your base URL in the managed settings too: this option works only if the Credential kind isn’t Identity provider sign-in (OIDC), and if neither the managed settings nor the Connection page sets custom request headers. Enter the same address, for example as
ANTHROPIC_BEDROCK_BASE_URL. On Microsoft Foundry, setANTHROPIC_FOUNDRY_BASE_URLin place ofANTHROPIC_FOUNDRY_RESOURCE.
- A Microsoft Foundry key: if the managed settings set
ANTHROPIC_FOUNDRY_API_KEYorANTHROPIC_FOUNDRY_AUTH_TOKEN, check which of these applies, and make the change in the managed settings. Don’t set bothANTHROPIC_FOUNDRY_RESOURCEandANTHROPIC_FOUNDRY_BASE_URL, because Foundry requests then fail.- If the managed settings set
ANTHROPIC_FOUNDRY_RESOURCE, or set neither that variable norANTHROPIC_FOUNDRY_BASE_URL: make sure thatANTHROPIC_FOUNDRY_RESOURCEis set beside the Foundry key. Otherwise, outside Claude Desktop’s sessions, Claude Code refuses each request to a Foundry resource once the computer hasforceLoginOrgUUIDorallowedAdminConsoleOrgUUIDs, even before a sign-in. If your provider is Microsoft Foundry, use the resource on your Connection page. With any other resource, Claude Code refuses each Foundry request after a sign-in. - If the managed settings set
ANTHROPIC_FOUNDRY_BASE_URLand your provider is Microsoft Foundry: a sign-in overrides that base URL, and Claude Code then refuses each Foundry request. Replace it withANTHROPIC_FOUNDRY_RESOURCE, set to the resource on your Connection page. To keep the address instead, leave it in the managed settings, and enter the same address in Azure AI Foundry base URL on the Connection page. Don’t set custom request headers in either place.
- If the managed settings set
forceLoginMethodandforceLoginGatewayUrl: removeforceLoginGatewayUrl, and don’t setforceLoginMethodtoconsoleorgateway. Otherwise, Claude Code refuses the sign-in to your organization.allowedProviders: add your provider to the list. For a gateway, addcustomEndpoint, and setANTHROPIC_BASE_URLin the managedenvto your Gateway base URL, with a lower-case host and no trailing slash. If a cloud provider’s base URL isn’t the provider’s own service address, also addcustomEndpoint, and set that exact address in the managedenv, for example asANTHROPIC_BEDROCK_BASE_URL.- Model names:
model,fallbackModel, andmodelOverridespersist. If those model names are for a different provider than your connection, remove them. - A policy helper: the computer ignores your console, even with
forceLoginOrgUUIDorallowedAdminConsoleOrgUUIDs
forceLoginOrgUUID or allowedAdminConsoleOrgUUIDs, or remove the setting if your organization’s ID is the only one. Also remove enforceAnthropicSignIn and parentSettingsBehavior if you set them. Ask developers to run claude auth logout in their terminal, which removes the leftover sign-in and their other Claude Code logins.
Where data goes
While a terminal uses your connection, model requests and their content go from the developer’s terminal to your provider or gateway, or to your provider’s base URL if you set one. For the sign-in and your settings, the terminal exchanges the following with Anthropic:- At sign-in: after the developer approves in their browser, Claude Code receives a token that can read the developer’s profile and the Claude Desktop configuration that applies to them, including your Connection settings. The token can’t run a model.
- At each download: Claude Code sends that token to
api.anthropic.comand receives the settings for that developer - To complete, renew, or end the sign-in: Claude Code sends the sign-in’s own tokens to
platform.claude.com
- Usage metrics: the sign-in itself sends some usage metrics to
api.anthropic.comand to Datadog (http-intake.logs.us5.datadoghq.com), even with Block nonessential telemetry on, because Claude Code downloads that setting after the sign-in - Error reports: a session under your settings sends none
- WebFetch domain check: a session sends each page’s host name to
api.anthropic.com, unless you turn on Skip WebFetch domain check
- Metrics and logs: Claude Code sends these, and traces if Export traces is on
- Content: prompts, responses, tool details, tool content, and raw API bodies go only if you select them under Content capture. If you select prompts, responses go too. Raw API bodies hold full requests and responses, so they include prompts, responses, and tool content even if you didn’t select those.
- The developer’s identity: each record includes the computer’s user name as
process.owner. Unless End-user attribution is off, it also includesenduser.id. This is the name from the developer’s sign-in to your gateway or identity provider, or else their account’s email address. - The computer’s name: if your JSON sets
OTEL_RESOURCE_INCLUDE_HOSTto1inenv, each record also includes the computer’s name and ID ashost.nameandhost.id. This requires Claude Code 2.1.336 or later. Your value replaces the value in the developer’s settings and in the computer’s managed settings. If you set no OTLP endpoint, the name goes to the collector that the developer’s or the computer’s settings name. - A token, if you choose to send one: if Collector authentication is Reuse the inference credential, Claude Code sends the collector the bearer token, if there is one, from your Helper script, your gateway’s sign-in, or your identity provider. That token can also make model requests as the developer, so use this option only for a collector that you operate. After the token expires, Claude Code sends data without a valid token until the next model request. If your collector refuses that data, it’s lost.
- Which sessions send: to check whether one session sends to your collector, ask the developer to run
/statusin Claude Code and read the Telemetry row. These sessions send nothing to your collector:- On any computer: a
claude sshsession - On a computer with no managed settings: a session that uses a claude.ai login, an Anthropic API key, or a base URL of the developer’s own
- On a computer whose managed settings name your organization: a session that doesn’t use your connection and can use a claude.ai login or
CLAUDE_CODE_OAUTH_TOKENfor its model requests. A collector that the computer’s managed settings name gets nothing from this session either. A session that uses a cloud provider that the developer set up, or a saved Claude Console key, sends to your collector. In Claude Code 2.1.331 to 2.1.333, a session that could use that login or token also sent to your collector.
- On any computer: a
- The sign-in, and the sign-in to your gateway or Amazon Bedrock proxy: in Claude Code’s credential store. This is the Keychain on macOS, and the file
.credentials.jsonin Claude Code’s configuration directory on Linux, or on macOS if the Keychain refuses the write. On Windows, it’s that file or Windows Credential Manager. - The stored copy of your settings: in Claude Code’s configuration directory,
~/.claudeby default. It doesn’t hold your connection or your collector’s address and headers. - A record of where your connection sent requests: in
~/.claude.json. The record holds your organization’s ID and no credentials. For a cloud provider, it also holds the provider with its region, project, resource, base URL host, AWS profile, and Amazon Bedrock inference profiles, which can include an AWS account ID. For a gateway, it holds the gateway’s host. If developers sign in to your gateway or Amazon Bedrock proxy through your identity provider, it also holds your identity provider’s address.
Security considerations
A developer doesn’t need administrator access to bypass your settings. These are some of the ways a developer can work without them, and what limits each one:- Signs in to another organization that’s set up this way, on a computer with no managed settings: the other organization’s settings, including its OpenTelemetry collector, apply instead of your organization’s settings.
forceLoginOrgUUIDorallowedAdminConsoleOrgUUIDsin the computer’s managed settings limits this. - Signs in to your organization while still signed in to a Claude apps gateway, on a computer with no managed settings: sessions stay on that gateway, and your settings don’t apply. The sign-in then prints
Claude Code still uses the gateway at. To fix it, the developer runsclaude auth logoutin their terminal and signs in to your organization again. If their own settings setforceLoginMethodtogateway, they first remove it andforceLoginGatewayUrl.forceLoginOrgUUIDlimits this./statusin Claude Code shows a session that follows a gateway’s own settings asCloud gateway, and the Allow sign-in from Claude Code in terminals and IDEs switch doesn’t stop it. - Signs in with their own Claude account: Claude Code ends the organization sign-in and removes the stored copy of your settings.
forceLoginOrgUUIDlimits this, andallowedAdminConsoleOrgUUIDsdoesn’t. On a computer that requires the sign-in, a claude.ai login still starts sessions on the Anthropic API, without your settings. - Changes how Claude Code starts on their own computer: the sign-in keys are checked on the developer’s computer. Sessions can run on the Anthropic API under another login, without your settings.
allowedProviderswithout"anthropic"in the computer’s managed settings limits this, if developers don’t need direct access to the Anthropic API. Otherwise, only controls outside Claude Code limit this. - Sends Claude Code’s traffic through their own proxy and certificate authority: the proxy can answer in place of Anthropic, so Claude Code can accept settings that Anthropic didn’t send. Only controls outside Claude Code limit this.
- Runs
claude mcp serve, which gives another program access to Claude Code’s tools: calls from that program skip your permission rules. The sandbox from Allowed egress hosts still applies. Only controls outside Claude Code limit this. - Sets
sandbox.filesystem.allowReadin their own settings: sandboxed commands can then read those paths, even if you deny them withsandbox.filesystem.denyRead,Readdeny rules, or Block reads outside working directories. Claude’s file tools still follow yourReaddeny rules and Block reads outside working directories.sandbox.filesystem.allowManagedReadPathsOnlyset totruein the computer’s managed settings stops this forsandbox.filesystem.denyReadandReaddeny rules. The console can’t set this key. Don’t set it if you use Block reads outside working directories, because that setting then doesn’t reach sandboxed commands. - Installs a plugin that contains a mod, loads one with
--plugin-dir, or has Claude write one: the mod runs code as the developer. Your deny rules, Disabled built-in tools, and Built-in tool policy don’t apply to actions of the mod itself.allowManagedHooksOnlyset totruein your JSON limits this. It also stops developers’ own hooks, and hooks and mods in plugins that developers add, including plugins from your Plugin marketplaces. - Runs an old version that doesn’t have the organization sign-in: it ignores your settings and
enforceAnthropicSignIn.requiredMinimumVersionin the computer’s managed settings limits this. Don’t set it on a computer that also runs Claude Desktop on your provider.
forceLoginOrgUUID: the check runs on the developer’s computer and isn’t a security boundary. It doesn’t check the organization of a saved Claude Console key or an Anthropic profile. Unless you also require the sign-in, both still work on the Anthropic API, and a saved Claude Console key also works at anANTHROPIC_BASE_URLthat the developer sets.enforceAnthropicSignIn: it applies only when Claude Code can read the managed settings that set it. If you set neitherforceLoginOrgUUIDnorallowedAdminConsoleOrgUUIDs, no session starts on a cloud provider or a custom base URL.- OpenTelemetry export: a developer can still stop it on their own computer, for example with a very short export timeout. They can also change the identity that it sends.
- Settings that run commands: these settings can run a command on the developer’s computer, in some cases without asking the developer. They are AWS profile name, AWS config directory, GCP credentials file path, and Helper script on your Connection page, OTLP headers helper script on your Telemetry & updates page, and
hooksandstatusLinein your JSON. Give the Owner role, and any other access to the Desktop 3P pages, the Claude Code page, or groups’ policies, only to people you trust to run programs on developers’ computers.