Skip to content
BENIBIX Learn

policyHelper

AI⌨️ Claude CodeConfiguration

Also known as policyHelper setting

A program IT runs to work out the rules each time Claude Code starts.

Think of it like

It is like a guard who looks at each guest, then says which rooms they may use.

Example

Emma's work trusts its locked laptops more. The helper checks each laptop and prints looser rules for those.

Why it matters

A file stays the same for all, but a program can fit each laptop and each person.

Definition

policyHelper is a key for managed settings. It runs a program at start to work out the managed settings. The program can look at the laptop, the person or a web service. What it prints becomes the managed settings for that session. The key holds path, timeoutMs and refreshIntervalMs. Settings sent from the server win over it.

Example code

json
{
  "policyHelper": {
    "path": "/opt/acme/claude-policy",
    "timeoutMs": 5000,
    "refreshIntervalMs": 300000
  }
}
Run it now, and run it again each five minutes.
The program runs first, and what it prints becomes the rules.

Common mistake

Setting it in the settings sent from the server. Claude Code skips it there, so put it in the managed file instead.

Key takeaways

  1. 1
    Runs at startup. Before the first prompt.
  2. 2
    Prints the settings. For this session.
  3. 3
    Can run again. refreshIntervalMs.