[BUG] policyHelper in /etc/claude-code/managed-settings.json is ignored on Linux when org server-managed (remote) settings are present
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
- Org account with server-managed settings (remote cache exists at ~/.claude/remote-settings.json).
- 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"}]}]}}}
- Verify standalone: running the helper prints the JSON and exits 0.
- Set /etc/claude-code/managed-settings.json to { "policyHelper": { "path": "/opt/bone-policy-probe.sh" } }.
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗