1. Pick a preset
Open Authorization → Policies and click New policy. The picker asks “What should be blocked?” Search or browse presets by category. Click Add beside a preset. The picker shows the status of presets you already added. Selecting one opens its row. To write your own rule, use Write your own at the bottom of the picker. See custom policies.2. Choose the scope
The policy drawer has two fields. Agents contains Claude Code and Codex. The Claude Code scope includes Claude Cowork. Endpoints includes every endpoint by default. Remove entries to limit the policy to one agent or specific endpoints. Kontext has not saved the policy yet. The following GitHub write presets also add Block unrecognized GitHub operations:- GitHub read only
- Protect Git history
- Require human merge
- Protect releases and workflows
- Protect repository settings
3. Observe
Click Observe to add the policy to Observing without blocking calls. Its row shows how many calls it would block in the selected window. Choose a 7, 14 or 30-day window in the top card. Open the row to review matching calls under a heading such as “Would have blocked 3 calls · Last 7 days”. Check that you want to block each call. A zero count does not prove that the policy would block nothing. Replay can skip calls with missing input or request evidence. For input-dependent rules, enable Full payloads before collecting new test calls. Review those calls before enforcing.4. Enforce
Click Enforce on the row or in its drawer to move the policy to Enforced. Its count now reads “blocked”. Your first enforced policy switches the workspace from Observe to Enforce mode. Endpoints start blocking on their next check-in, about once a minute. Check that Explore shows Deny for new matching calls. Rollout and failure behavior explains the top card’s badges while endpoints apply the change.Presets
The shell-based presets read the command as written. They cannot identify operations behind aliases, variables,
xargs, sh -c or scripts. GitHub presets also miss GitHub Enterprise hosts and API bodies from files. The policy API lists each preset’s coverage and known gaps.
Change a policy
Open the policy’s row. Kontext deploys each change when you click its button.
Kontext marks a rule Modified when it differs from the catalogue preset. Narrowed means the observing copy covers fewer agents or endpoints than the enforced copy. Removal means the observing set omits an enforced policy. A warning appears under the title when a rule names a tool that endpoints do not report.