Guardrails for Claude Code agents
Sidefleet checks every command a Claude Code agent wants to run against your team's policies, before it runs. Reading files, editing in the task's worktree and running tests go ahead. Pushes to main and deletes on production data are blocked. Database queries, deploys and secrets wait until someone approves them, from the page, a phone notification or a chat app. Every decision goes into an audit log that shows if anyone tampers with it. The agents run on your own machines, under your own sign-ins.
Watch only blocks nothing and shows what Balanced would have stopped · Hosted or self-hosted
src/reports/export.tsAllowedsrc/reports/export.tsAllowedpnpm test reportsAllowedgit push origin mainBlockedPolicy: no pushes to mainpsql "$PROD_DATABASE_URL" -c "select count(*) from orders"Heldpsql "$PROD_DATABASE_URL" -c "select count(*) from orders"
Bash git push origin main ✕ Blocked by "Push to protected branches" pushing to main isn't allowed; push the task branch and open a pull request instead. Bash git push -u origin sidefleet/41af ✓ Allowed by "Push task branches"
How does Sidefleet check an agent's commands?
On a Sidefleet machine, each Claude Code run gets a hook that fires before every tool call. The hook sends the call to your control plane, which matches it against your policies and answers: run it, hold it for a person, or block it.
A blocked call never runs. The agent gets one sentence saying why and what to do instead, so it can carry on with the task.
- An approval covers one exact command. Sidefleet stores a SHA-256 of it and lets only that command through. If the agent changes it, it asks again.
- It fails closed. If the control plane can't be reached, the agent can still read files, and everything else is denied.
- Nothing waits forever. A request nobody answers within 15 minutes is denied, and the command doesn't run.
What does each safety level allow?
A new setup picks one of three levels before its first task. Watch only blocks nothing and notes what Balanced would have stopped, so you can see the rules against real work before you turn them on.
| When the agent tries to | Watch only | Balanced | Strict |
|---|---|---|---|
| Read files | Runs | Runs | Runs |
| Edit files in the task's worktree | Runs | Runs | Runs |
| Run tests, builds and other shell commands | Runs | Runs | Asks |
| Push the task's own branch | Runs | Runs | Asks |
| Use an MCP tool | Runs | Runs | Asks |
| Write files outside the worktree, other than temporary files | Runs | Runs | Blocked |
Run psql, mysql or another database client | Runs, noted | Asks | Asks |
| Read a secret, such as a token in an environment variable | Runs, noted | Asks | Asks |
Deploy, with kubectl apply, helm upgrade or terraform apply | Runs, noted | Asks | Asks |
Push to main, master or a release/* branch | Runs, noted | Blocked | Blocked |
Run DELETE, DROP or TRUNCATE on a database, or terraform destroy | Runs, noted | Blocked | Blocked |
Change the level any time under Policies. A level only rewrites the built-in policies nobody has edited, and anything no policy allows is blocked. When a policy allows a call, Claude Code's own permission mode still applies.
Who approves a held command, and from where?
An org owner, or the agent's owner. Each agent can have an owner, so the person who runs it can answer its requests without being an admin.
They can answer in the task's thread, on the Approvals page, from a notification on their phone, or in a connected chat app like Telegram, WhatsApp or Discord.
- Approve once runs that command this time only.
- Always allow in this repo or for this agent adds a narrow policy for exactly that action, so it isn't asked again.
- Deny with a message, and the agent reads it.

- Matches
database.queryshell.exec: psql, mysql- Applies to
- The whole org · priority 10
- Agent is told
- "querying a production database needs a person's OK; wait for it, or use a local or staging database."
Can I write my own policies?
Yes. A policy names the actions it matches, a decision (allow, ask or block) and a priority. It applies to the whole org, one team, one agent or one repo.
For each action, the matching policy with the lowest priority number decides. An action that nothing matches is blocked.
- Match on arguments, like
git.push: main, release/*ordatabase.write: DELETE, DROP. - Tell the agent what to do instead. Each policy has one sentence the agent gets when it holds or blocks a call.
- Test a command first. The API's evaluate endpoint says which policy would decide it, using the same code the agents are checked with.
What goes in the audit log, and can anyone change it?
Sidefleet records approval requests and answers, blocked actions, policy and permission changes, new agents, suspensions and revoked keys.
The database refuses to edit or delete a record, and each record stores a SHA-256 of the one before it. A changed or missing entry breaks the chain from that point on.
- Check the chain any time. Verifying walks the whole log and names the first record that doesn't fit.
- Export it as CSV or JSONL, filtered by agent, event or date.
- See every checked tool call through the API, with its outcome and the policy that decided it.

How do I stop an agent right now?
Suspend it. Its machine stops taking tasks for that agent, its running tasks stop, its pending approvals are cancelled and any agent key it holds is revoked. Reactivate it when you're ready.
Questions about Claude Code guardrails
Does this replace Claude Code's own permissions?
No, it adds a check in front of them. When a policy allows a call, Claude Code's own permission mode decides as before, along with any rules in your settings.json.
Are Codex and opencode checked too?
Not command by command yet: they have no hook Sidefleet can use, so their tool calls aren't checked. Suspending one still stops its running tasks and keeps it from getting new ones.
Is it a sandbox?
No. Policies match commands by pattern, such as database clients, deploy commands and pushes to named branches. A command hidden inside a script, or an ssh to another server, can get past them. Use guardrails alongside the agent's own limits, such as the Read & edit permission mode.
What happens if the control plane goes down?
In Balanced or Strict, the agent can still read files and keep its to-do list, and everything else is denied until the control plane answers again. In Watch only, calls go ahead.
Can I try it without blocking anything?
Yes, that's Watch only, the level a new setup is offered first. Every command is checked and recorded, and the Policies page shows what Balanced would have asked about or blocked. When that list looks right, turn Balanced on from the same card.
Does it work on the hosted version?
Yes. Policies, approvals and the audit log work the same on the hosted control plane at app.sidefleet.xyz and on one you run yourself with sidefleet up.
Can our own agents use the same policies?
Yes. A custom agent registers through the API, gets an agent key and asks POST /v1/gateway/evaluate before each action. Its decisions go into the same audit log. See the API docs.
What if Sidefleet goes away?
You can host the control plane yourself today, with your policies and audit log in your own Postgres. It's source-available under FSL-1.1-ALv2, and each version becomes Apache 2.0 two years after release.
Let agents work unattended, inside rules you set
Start with Watch only, see what Balanced would have stopped, then turn it on.