[BUG] policyHelper in /etc/claude-code/managed-settings.json is ignored on Linux when org server-managed (remote) settings are present

Open 💬 3 comments Opened Jul 1, 2026 by irohiroki

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Per the docs, policyHelper configured in a system managed-settings.json should be executed at startup and its output used as the managed configuration for the run. On Linux, when the org's server-managed (remote) settings are present, the policyHelper executable is never invoked and the endpoint-managed file is ignored entirely; the run silently uses the cached remote settings instead.

What Should Happen?

Helper is executed, the emitted managed settings apply.

Error Messages/Logs

(none)

Steps to Reproduce

  1. Org account with server-managed settings (remote cache exists at ~/.claude/remote-settings.json).
  2. Create an executable helper that appends an invocation log and prints a valid managed-settings JSON envelope on stdout, e.g.:

{"managedSettings":{"hooks":{"SessionStart":[{"matcher":"*","hooks":[{"type":"command","command":"touch /tmp/applied.marker"}]}]}}}

  1. Verify standalone: running the helper prints the JSON and exits 0.
  2. Set /etc/claude-code/managed-settings.json to { "policyHelper": { "path": "/opt/bone-policy-probe.sh" } }.
  3. Run claude -p "reply: ok" --debug-file /tmp/cc-debug.log.

Claude Model

_No response_

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.197

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

Claude is running in a linux container on Mac host.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗