Beta
Start for free

GuidesGuide

A guide to rolling out Claude Code to your team with managed settings

Rolling Claude Code out to a team means keeping settings aligned across several machines. Plugins bundle additional functionality; telemetry is the usage data sent to an external system. When each engineer configures permissions, plugins, and destinations in ~/.claude/settings.json, comparing machines takes more work.

Claude Code settings are layered, and the layer your organization deploys, managed settings, sits on top. According to the Claude Code settings documentation, no user, project, or --settings value can override a managed value, apart from a few security-sensitive keys. OpenTelemetry, a standard for collecting and exporting telemetry, can also be configured there. Managed settings let you align the permissions, plugins, and telemetry settings that actually apply on each machine.

Settings can arrive as a file, through mobile device management (MDM), or from the admin console as server-managed settings. By default, the highest-priority source containing policy settings is selected, with exceptions for settings such as environment variables. A hook is a command triggered at a specific event, such as the start of a session, one run of the agent. Plugins that include hooks also depend on the installed runtime. Enabling content logging sends the text of user instructions (prompts) or agent responses to the chosen receiver.

This guide uses the Harnessforce onboarding specification as a deployment design example. To relate telemetry to issues, or work items, it bundles telemetry destinations, hook credentials, and plugin settings in a managed settings file. The example omits content-logging variables. We distinguish the rules shared by Claude Code deployments from choices made for this design.

Below, we'll cover how Claude Code settings are layered and delivered, the 4 capabilities a team rollout needs, and how to operate the rollout once it's live.

In this article

Start with settings layers and delivery mechanisms before distributing permissions, plugins, and telemetry. The later sections cover verification and where each role should begin.

Claude Code settings layers and delivery mechanisms

Claude Code resolves settings across 5 layers, and a key set in a higher layer overrides the same key below it. Managed settings form the top layer and have 3 main administrator-controlled delivery mechanisms. Before you roll anything out, decide what belongs in which layer and which mechanism will carry it.

Layer (highest first)Where it livesWho decides
Managed settingsmanaged-settings.json, MDM, or the claude.ai admin consoleYour organization
Command lineclaude --settingsThe person running that session
Project local.claude/settings.local.jsonYou, in one project
Shared project.claude/settings.jsonEveryone who uses the repository
User~/.claude/settings.jsonYou, in every project

Environment variables aren't a layer in this stack. When a shell variable and a settings key control the same behavior, which one wins is defined pair by pair. Telemetry has its own rule: Claude Code ignores variables for the OpenTelemetry exporter, the component that sends telemetry, in a repository's .claude/settings.json and .claude/settings.local.json (monitoring documentation). Exporter variables in those settings files cannot enable or redirect telemetry.

The 3 main administrator-controlled delivery mechanisms

The managed settings documentation describes the mechanisms below. Windows also has a conditional HKCU registry mechanism, which is not used when an administrator-managed document is present.

MechanismWhere the policy livesWhen Claude Code reads itUse it when
Filemanaged-settings.json in /Library/Application Support/ClaudeCode/ on macOS, /etc/claude-code/ on Linux and WSL, or C:\Program Files\ClaudeCode\ on WindowsAt startup, and again when the file changesMachines without MDM, Linux hosts, or images you build yourself
MDMA macOS configuration profile (com.anthropic.claudecode) or the Windows registry (HKLM\SOFTWARE\Policies\ClaudeCode)At startup, then checked every 30 minutesYou already manage devices with MDM or Group Policy
Server-managed settingsThe claude.ai admin console or a Claude apps gatewayAt startup, then polled hourlyYou want one place to change policy without touching machines

When several mechanisms reach the same machine, Claude Code uses the first source with a policy key, a setting that defines organization policy, by default. The order is server-managed settings, MDM, then file. A few keys, such as env, are read from every source, but the plugin keys aren't among them. To combine every source, set managedSourcesBehavior to "merge" in the highest-ranked one (Claude Code v2.1.242 or later).

Since v2.1.223, env merges per key, with exceptions for telemetry variables selected as a group. Distributing a file therefore does not universally enable the plugin. Harnessforce hooks using an organization-shared key read their endpoint and key from files; verify the effective plugin and settings on each target device.

Warning

If a machine already receives an MDM policy, adding a managed-settings.json won't apply the enabledPlugins and extraKnownMarketplaces in that file by default. Run /status in Claude Code and read the Setting sources line to see which mechanism won.

4 capabilities a team rollout needs

A team rollout needs 4 capabilities: shipping policy from one place, distributing plugins, pinning where telemetry goes, and keeping hooks from blocking work. Managed settings can carry all 4 in a single file, but each one has its own failure mode.

1. Ship one managed policy

Managed settings let your organization control the permissions, telemetry, and plugins that the selected policy supplies. They use the same JSON shape as settings.json. Check each machine to confirm that it actually selects the source you deployed.

For example, this file blocks reads of secret files, turns on OpenTelemetry export, and enables one plugin from your organization's marketplace, its catalog of plugins.

{
  "permissions": {
    "deny": ["Read(./.env)", "Read(./secrets/**)"]
  },
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
    "OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel.example.com",
    "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <token>"
  },
  "extraKnownMarketplaces": {
    "your-marketplace": {
      "source": { "source": "github", "repo": "your-org/your-marketplace" }
    }
  },
  "enabledPlugins": {
    "your-plugin@your-marketplace": true
  }
}

If different teams own different parts of the policy, give each one its own file in managed-settings.d/, next to managed-settings.json. Claude Code reads managed-settings.json first, then merges every *.json file in the directory in alphabetical order, so prefixes like 10-telemetry.json and 20-security.json control the order. Nested blocks such as env merge key by key, while a marketplace entry with the same name is replaced whole by the later file.

Warning

If any managed settings file isn't valid JSON, Claude Code refuses to start. Run a JSON syntax check before you push the file to the fleet.

2. Distribute plugins through a marketplace

Plugins enabled by the effective managed policy install at the start of the next session. The machine must select that policy and be able to access the plugin source. Register the marketplace with extraKnownMarketplaces and enable the plugin with enabledPlugins. A marketplace is a catalog of plugins that Claude Code fetches from a git repository, a URL, or a local path (plugin management for organizations). The extraKnownMarketplaces key is the marketplace's name from its marketplace.json. Each enabledPlugins key takes the form plugin-name@marketplace-name.

A plugin set to true in managed settings keeps loading even if an engineer disables it in their own scope. Setting it to false blocks it at every scope and hides it from the marketplace listing. If the marketplace lives in a private repository, every engineer needs read access, because each machine clones it with its own git credentials.

To stop engineers from installing plugins from sources you haven't approved, list the allowed sources in strictKnownMarketplaces. extraKnownMarketplaces only registers a marketplace; it doesn't restrict anything.

You can also ship plugins through a repository's .claude/settings.json. The extraKnownMarketplaces entries there apply only after each engineer trusts the folder, though. Use managed settings for organization-wide plugins, then verify that they are enabled on each target machine.

3. Pin the OpenTelemetry destination

Ship telemetry variables in the managed env block so the endpoint and auth headers are the ones your organization chose. When managed settings set OTEL_EXPORTER_OTLP_ENDPOINT, Claude Code removes user-supplied endpoints for individual data types, or signals, at startup. When managed settings set OTEL_EXPORTER_OTLP_HEADERS, it removes every endpoint variable the engineer set, preventing those user-supplied destinations from redirecting the credentials to a different collector, or telemetry receiver.

We have a guide to Claude Code OpenTelemetry that goes deeper into each variable and into enabling traces, which are in beta.

The variables that log content, such as OTEL_LOG_USER_PROMPTS, OTEL_LOG_ASSISTANT_RESPONSES, and OTEL_LOG_TOOL_CONTENT, are off in Claude Code until something sets them. The Harnessforce organization policy goes further than the example and sets each of them explicitly, as 1 for a content category the Workspace stores and 0 otherwise, so that a value left on a machine or in the environment cannot send a category nobody chose. Removing those lines from the policy leaves the choice to each engineer, and harnessforce login sends content only on a machine whose content setting is on (harnessforce config set send-content on), after showing who can read it and how long it is kept. The Harnessforce receiver drops any category the Workspace, its organizational unit, does not store.

Decide where keys live, too. In the Harnessforce specification, the shared organization key ships in the managed settings file. For Claude Code, keys issued to individuals go into the OS keychain (Keychain on macOS, Secret Service on Linux or the in-memory kernel keyring where it isn't available, Credential Manager on Windows) and never into a settings file in plaintext.

4. Build hooks that fail open

Telemetry hooks you deploy to the whole team should keep the engineer's work running even when their endpoint is unreachable. Command hook behavior depends on its exit code (completion status), standard output (stdout) JSON, and the triggering event; exit 0 alone does not guarantee that work continues (hooks documentation). A UserPromptSubmit hook that exits with 2 blocks the prompt, so it never reaches Claude, but the prompt text can still remain in the blocked message and in the session transcript.

Hooks also run under constraints you have to plan for. Claude Code doesn't pass the OTEL_* exporter variables to the subprocesses it spawns, so a hook that sends data needs an independent way to read its endpoint settings. The documentation also doesn't say Claude Code provides a runtime such as Node.js for hooks. A hook that cannot start cannot send its records. For SessionStart and UserPromptSubmit telemetry, verify that startup failures leave the engineer's work running.

The Harnessforce specification requires its telemetry hooks to fail open. Harnessforce hooks always exit with 0, give up on a request after 2 seconds, and do not immediately repeat the same request. If SessionStart registration failed, the first UserPromptSubmit registration also serves as a resend. They check the Node.js version first and send nothing on anything older than 18. The specification sets 18 as the minimum because the hooks use the built-in fetch with no dependencies, and 18 is the first version where fetch works without a flag.

When using an organization-shared key, Harnessforce hooks read their endpoint and key from the managed settings file, not from process environment variables. Individual keys use a separate path with the OS keychain and a check against the pinned destination origin, the combination of scheme, host, and port. A repository's .claude/settings.json can set environment variables through env once the folder is trusted, and the rule that ignores OpenTelemetry exporter variables does not protect custom hook settings. A hook that trusted the environment would let any repository swap in its own endpoint and key and collect your engineers' records. For organization-shared keys, Harnessforce hooks don't read values delivered through MDM or server-managed settings, so the values they need ship as a file.

Operating and improving the rollout

After you deploy, confirm the policy works on one machine, expand to the fleet, and then work through the machines that don't report. Claude Code gives you 3 tools for this: /status, /plugin, and claude doctor.

  • Check the source: In /status, the Setting sources line should list Enterprise managed settings followed by the mechanism Claude Code selected, such as (file). If the line is missing, no managed policy reached the machine.
  • Check plugins: Open /plugin and confirm the marketplace and plugins are listed. Plugins from managed settings install at the start of the next session.
  • Check dropped entries: claude doctor lists the entries Claude Code discarded because they failed validation.

When telemetry doesn't arrive, the Harnessforce onboarding specification gives a longer list of checks; these are the main ones.

  1. Check the destination: Confirm the endpoint URL and key match the values you deployed.
  2. Check the plugin: Confirm the plugin that ships the hooks is enabled.
  3. Check the runtime: Confirm the machine has what the hooks need, such as Node.js.
  4. Check for a restart: Confirm the engineer restarted Claude Code after the policy arrived.
  5. Check for a competing source: Confirm another managed settings mechanism isn't taking priority and overriding the telemetry settings.
  6. Check the network: Confirm the machine can reach the internet without a TLS-inspecting proxy. Harnessforce hooks connect directly without proxy settings, so they can't send from networks that force traffic through one.

When several teams share one policy, the documentation recommends giving each team its own file in managed-settings.d/ instead of co-editing one file. That way the telemetry owner and the security owner can ship changes without touching each other's settings.

How Harnessforce can help

Telemetry you ship through managed settings is only as useful as your ability to read it once it lands. Harnessforce makes that telemetry readable issue by issue.

Harnessforce can help you:

  • Turn AI work into data: Harnessforce turns AI work into data your team can analyze.
  • Follow every issue: For each issue, see how many times AI ran, what it did, what it cost, and how continuous integration (CI) and review went, then inspect traces (operation flows), logs (event records), and metrics (aggregate measurements).
  • Show gaps as gaps: Anything that can't be collected is marked as not measured, never shown as if it had been collected.
  • Say what happens to content: Prompt and response content arrives only from machines that send it. Machines send it by default, and each member can stop it on their own machine. The workspace decides whether it is stored, who can read it, and for how long.
  • Work alongside your tools: Harnessforce doesn't replace the tools you already use; it runs alongside them.

Read the Harnessforce installation guide, or talk to us.

Getting started by role

Engineering leads test the policy on a few machines, and device admins choose how to deliver it. Engineers check which settings and plugins actually reached their machines.

Engineering leads

Start with a policy that carries only permissions and telemetry, on a handful of machines. Confirm the Setting sources line in /status on one machine before you add plugins and expand to the whole team, so you can isolate what breaks.

Device admins

Use MDM for machines you already manage with MDM or Group Policy, and the file mechanism for unmanaged machines and Linux hosts. If you deploy multiple sources, plan their priority and merge behavior. The exceptions for env do not imply that plugin settings merge too.

Engineers

Run /status and /plugin to see the settings and plugins your organization shipped. If you're trying telemetry on your own without managed settings, set the variables in your shell or ~/.claude/settings.json. Exporter variables in a repository's .claude/settings.json are ignored.

Glossary

Managed settings carry organization policy, while marketplaces and plugins distribute functionality. Hooks start commands at specific events, and OpenTelemetry carries usage data.

Managed settings

Claude Code settings that your organization deploys to machines. They arrive as a file, through MDM, or from the claude.ai admin console, and they take priority over user and repository settings.

Marketplace

A catalog of plugins. Claude Code fetches it from a git repository, a URL, or a local path, and extraKnownMarketplaces registers it on a machine.

Plugin

A bundle of skills, commands, agents, hooks, and MCP server configuration that ships as one unit. You turn it on with enabledPlugins.

Hook

A command Claude Code runs at points such as session start or prompt submission. Its result depends on the exit code, stdout JSON, and the rules for the triggering event.

OpenTelemetry (OTel)

The standard for collecting and exporting telemetry. Claude Code uses it to export 3 signals: metrics, logs (events), and traces.


This guide was written with AI assistance and reviewed by the author.