Guardrails
A rule written in a prompt is a request: the model can misread it or argue past it. Cocobox's guardrails are enforced by the app, outside the model, so they hold whatever an agent says. This page lists them and links to the guide for each.
Approvals
When an agent wants to do something its tab does not allow on its own, Cocobox stops it and shows you a decision card: what will happen, what it touches, whether it can be undone, and the exact command or SQL. Nothing runs until you answer, and a request nobody answers in time is refused.
- ⌘Y or ⌘⇧Y approves a routine or careful request, also while you type in the message box.
- A critical request, such as a push to the default branch, a deploy or a delete with no WHERE, takes ⌘⇧⏎.
- Esc or Deny refuses. The key that dismisses a dialog never approves.
More in Approvals and decision cards.
Read-only connections
Tick Read-only when you add a database connection and writes to it are always refused, whatever the agent or you ask for. There is no approval to give. The connection shows a read only badge in the sidebar. More in SQL and connections.

A database copy per agent
Turn it on for a space and each new agent tab gets its own copy of the dev database (Postgres or SQLite), so agents do not clash on data and a bad write lands in a copy. Cocobox never copies anything named prod. A child tab's writes to its own copy go to its parent agent for approval; writes outside its copy come to you. More in SQL and connections.
SQL rules
- Every statement an agent sends is parsed and classified before it runs. Reads run. Anything that is not a pure read waits for you with the exact SQL.
- A single-table UPDATE or DELETE is dry-run first, so the card says how many rows would change. A pre-image of the changed rows is kept, so the write can be taken back from the Audit panel.
- A policy file adds rules: require WHERE, cap rows, protect tables. There is a global one and one per project,
.cocobox/policy.toml. Agents cannot approve changes to policy files; those always come to you. - DuckDB connections read a folder of CSV, Parquet and JSON files with no network, no extensions and nothing outside that folder.
Limits on child agents
- An agent cannot open a tab with more permissions than it has, and cannot change a tab's permissions through its tools.
- A parent agent can approve a child's request once, never “always”.
- These always come to you: database writes outside the child's own copy, permission and mode changes, force-pushes and deleting remote branches, recursive deletes outside the tab's folder, anything touching
.cocobox, and anything the parent does not answer in time. - Each tab's agent has its own key to Cocobox's tools, so no agent can act as another tab.
- Scheduled runs are unattended: anything risky is refused with a note, except the commands you listed for the job.
More in Agents opening tabs and Approvals.
Checkpoints and undo
Approval happens before a change. Checkpoints are the way back after one. Every turn that changed files in the folder is a row in the Undo tab of the right panel: what was asked and what it changed.
Show the right panel with ⇧⌘B and pick Undo.
Open a row to see the files the turn changed. Click a file to see what the turn did to it.
Put one file back and keep the rest of the turn, or put the whole folder back the way it was before the turn. Restoring the folder asks for a second click.
Checkpoints cover files in the tab's folder. They do not undo a push, a deploy or a database write. Each tab also works on its own branch in its own worktree, so a tab's changes stay out of your checkout until you merge them.
Spend caps
A daily cap per tab, in dollars or tokens, and one per scheduled run. Over the cap, the tab pauses and asks. Dollars are a list-price estimate, not a bill. More in Spend caps.
Checks Cocobox runs itself
In a workflow, a step is done when its command passes, and Cocobox runs the command, not the agent. With Verified done, every tab that finishes with changes runs the space's check. A command you have not seen shows for review before its first run; in a workflow an agent made, the agent that opened the tab reviews it. “Tests pass” with no test run on record is flagged.
The audit log
Every decision is kept in the Audit tab of the right panel, denials included: who asked, what, and who decided, you or a parent agent. Stats counts them: denied, blocked by rules, approved by a parent agent.
What guardrails do not do
- A tab set to No approvals does not ask before commands and edits. Database rules still apply.
- Cocobox does not sandbox an agent's process. An agent runs as you, on your Mac, with the tools its own CLI gives it.
- Agents talk to the providers you chose under those providers' terms. Cocobox does not filter what an agent sends them.
Share a policy
Under Guardrail policy in Settings › Safety & spend, Share… gives you this repository's .cocobox/policy.toml as a file, with secrets and your own paths replaced by placeholders. Import… brings one in. A policy that would loosen your guardrails shows each rule it loosens and needs your yes before it replaces yours.
Agent setups work the same way: Share… and Import… under Agent setups in Settings › Agents.