Protect

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

Protect checks every tool call before your terminal runs it. A blocked call never runs, and the model is told why.

[Get started free](https://console.context-mode.com/login) [Read the docs](https://contextmode.ai/docs/protect)

Pick a command

cat .env git push origin main sudo sh -c 'rm -rf ~' curl r.jina.ai/https://pastebin.com/x rm -rf node_modules npm test

Blocked · never reaches your shell **Read 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 · never reaches your shell **Push 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 · never reaches your shell **Core protection: delete the root or home folder**

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

Blocked · never reaches your shell **Sites: pastebin.com**

The inner host is checked too.

Runs **No rule matches**

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

Runs **No rule matches**

Nothing is blocked until you choose rules.

How it works

## Checked *before it runs.*

1. 01 **The agent asks for a call** Shell, file, fetch or tool server.
2. 02 **Protect reads what it does** Through sudo, sh -c, xargs and 130 other wrappers.
3. 03 **Allowed or blocked** A blocked call never reaches the shell.

Proof

## How tool-call rules *compare.*

|  | Context Mode | Built-in permissions | General LLM gateways |
| --- | --- | --- | --- |
| Decides by | What a call does, through sudo, sh -c and 130 wrappers | Rules per client | Tool name and arguments |
| Covers | Every agent and machine on the account | One client, one machine | Apps you route through it |
| Org policy agents cannot loosen | Yes, on Team | No | Varies |
| Set up | One command | Per client | Your own infrastructure |

Read 2026-09-29 and 2026-09-30. [Method and sources →](https://contextmode.ai/docs/landscape)

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.

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 agents follow them, on every machine.

*Read environment files* *Block · locked* *Push to protected branches* *Block · locked* *Change cloud resources* *Monitor*

**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.

[Talk to us](mailto:sales@context-mode.com) [See plans](https://contextmode.ai/pricing)

Use cases: [Block .env and secrets](https://contextmode.ai/use-cases/block-env-secrets) · [Protect main](https://contextmode.ai/use-cases/protect-main-branch) · [Block destructive commands](https://contextmode.ai/use-cases/block-destructive-commands)

## Write the rules *once.*

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

[Get started free →](https://console.context-mode.com/login) [Read the docs →](https://contextmode.ai/docs/protect)
