Protect

Let agents work. Keep production, secrets and main safe.

Protect checks every tool call before your terminal runs it. In Claude Code and Codex, a blocked call never runs, and the model is told why.

Pick a command
Blocked · stopped before your shellRead environment files

.env and .env.*. Examples and templates are allowed.

⛔ context-mode Cage blocked this command, so it was NOT executed:
Blocked by your team’s policy: Read environment files. .env files hold secrets.
Blocked · stopped before your shellPush to protected branches

main, master, production and release/*.

⛔ context-mode Cage blocked this command, so it was NOT executed:
Blocked by your team’s policy: Push to protected branches. Protected branches change through reviewed pull requests.
Blocked · stopped before your shellCore protection: delete the root or home folder

Read through sudo, sh -c and about 130 other wrappers.

Blocked · stopped before your shellSites: pastebin.com

The inner host is checked too.

RunsNo rule matches

A project folder is fine. Only losses you can't undo are blocked.

RunsNo rule matches

Nothing is blocked until you choose rules.

How it works

Checked before it runs.

  1. 01The agent asks for a call

    Shell, file, fetch or tool server.

  2. 02Protect reads what it does

    Through sudo, sh -c, xargs and 130 other wrappers.

  3. 03Allowed or blocked

    A blocked call never reaches the shell.

Proof

How tool-call rules compare.

Context ModeBuilt-in permissionsGeneral LLM gateways
Decides byWhat a call does, through sudo, sh -c and 130 wrappersRules per clientTool name and arguments
CoversClaude Code and Codex, on every machine on the accountOne client, one machineApps you route through it
Org policy agents cannot loosenYes, on TeamNoVaries
Set upOne commandPer clientYour own infrastructure

Read 2026-09-29 and 2026-09-30. Method and sources →

Features

Start in a minute.

Core protections

Stop losses you can't undo, like wiping your home folder.

Secrets

Keep .env files away from the model.

Sites

Allow or block hosts, nested URLs included.

Monitor first

Record matches before you block them.

Presets

Three presets and four extra packs.

Keep your sandbox

Protect reads the call, not the program. Use both.

Protect is in every plan and is off until you turn it on. Nothing is blocked until you pick a preset or add rules. Balanced and Locked down include Core protections. We verified that Protect blocks calls in Claude Code and Codex. In Pi, it only records them.

Team and Enterprise

One policy for the whole org.

An agent cannot loosen it

On Team, the org sets the rules once. Every member's Claude Code and Codex follow them, on every machine.

Read environment filesBlock · lockedPush to protected branchesBlock · lockedChange cloud resourcesMonitor
One log

What agents tried and which rule answered. Export as CSV or JSON Lines.

Your deployment

Our cloud, a dedicated instance, or your own Cloudflare account.

Use cases: Block .env and secrets · Protect main · Block destructive commands

Write the rules once.

npx @context-mode/cli connects your agents. 1,000 requests free, no card.

Get started free

Context Mode Gateway: your coding agent costs less and remembers your project. Context Mode Engine installs from your terminal.

Start free: 1,000 requests, every feature, no card. After you sign in, the console gives you one command to connect your coding agent.

Read the docs