Extend and protect
Guardrails and Key Shield
Set rules your agents follow, handle a step a rule stopped, ask your team for exceptions, and let agents use API keys without seeing them.
Guardrails are rules your agents follow: what they may run, touch and merge. Key Shield lets agents use your API keys without ever seeing them. Both live under Settings › Agents.
Guardrails
| Rule | What happens |
|---|---|
| Block | The agent can't do it. The chat shows why. |
| Ask first | The agent waits for a yes or no from you, or your team's owners and admins. |
| Verify after | The step runs now. The checks the rule names run before a commit or push lands. |
Your list starts with four rules you can remove: No force-push to main, Block deleting files outside the task folder, Never edit migrations that already ran and No secrets in commits.
Add a rule
- Open Settings › Agents › Rules.
- Type the rule in plain English, such as "Ask me before anyone writes to the production database".
- Click Read it back. Zokie shows the rule's kind and one sentence saying what it will do.
- If it's wrong, click Not that and try new words. If it's right, click Just for me, or, as a team owner or admin, Add to and the team's name.
Reading a rule back needs Claude Code installed. To stop one of your rules, click Remove on its row.
When a rule stops an agent
The chat shows a Stopped by a guardrail card with what the agent tried, the rule and why it exists.
- Your own rule: click Allow once, then ask the agent to try again. Edit rule opens your rules.
- A team rule: click Request exception. The card says Asked your team. Owners and admins pick Allow once, Allow for this task or Don't allow on their phones, and the card changes to Your team said yes or Your team said no.
An Ask first rule that names you opens a card with Allow this once and Don't allow, on your phone too.
Rules apply to most agents, and the chat says when one isn't covered. A team with locked rules only runs agents Zokie can check, and the chat tells you which to pick.
Team rules
On a team's board, your team's rules apply as well as your own. Only owners and admins change them. Your guardrails lists the rules for a task under From your team and Your own, names your profile if your team set one, and has Suggest a rule to send admins an idea.
If Zokie can't confirm your team's rules, the chat header shows Changes paused and agents won't change anything until it reconnects. Click it to open Your guardrails.
Owners and admins can click Export the activity log at the bottom of Rules to download a CSV of every block, ask, approval and stopped commit. Code, diffs and chats are never recorded.
Key Shield
You paste a key once, and agents get a stand-in that only works on the key's own service. If the stand-in leaks anywhere else, it exposes nothing.
- Open Settings › Agents › Keys and click Add key.
- Paste the key. Zokie shows the service, the name agents will see, the hosts it works on and its last three characters. For a service it doesn't know, type the name, like
WEATHER_API_KEY, and the host, likeapi.example.com. - Click Shield it. Agents get the stand-in from their next session.
The switch at the top of the page turns Key Shield on or off for every agent on this Mac. When the page finds unshielded keys in your repositories' .env files, click Shield it or Shield all. Those lines then hold the stand-in, so your code keeps working.
When an agent tries to send a key to a host it doesn't work on, a Key Shield card says the key stayed home. Click OK, or Let it use and the host's name, then ask the agent to try again.
Each key's row shows where it works and when it was last used. Click Revoke, then Sure? Revoke, to take it from every agent, and revoke it at its service too if it may have leaked. Rotate appears when someone who left your team still has a team key: make a new key at the service and paste it in.
Your own rules and keys work on every plan, and your keys follow you to your other Macs on Pro. Team rules, exceptions, the activity log and team keys come with Teams. See pricing.