Cocobox

Approvals and decision cards

When an agent wants to do something its tab does not allow on its own, such as running a command, editing a file or writing to a database, Cocobox asks you with a decision card. The card says what will happen, what it touches and whether it can be undone, and how careful you need to be.

Read a decision card

  1. A request from the tab you are looking at sits in its conversation, so you can read what led to it. A request from another tab shows in the Needs you strip and as a dialog with Show.

  2. The top names the verb (Reads, Edits, Pushes, Deletes…) and the kind of request. What will happen says it in a sentence.

  3. Touches says where it reaches (this tab's folder, this Mac, or outside this Mac) and what it names: files, branches, remotes.

  4. Undo says in words whether it can be taken back: nothing to undo, by hand, unknown (Cocobox could not check), or not possible. Cocobox uses facts from git and checkpoints for this.

  5. Exactly this, unrewritten shows the command, tool call or SQL that will run, as is.

    A critical decision card: DELETES, Deletes a branch on origin, touches outside this Mac, origin, checkout-v1, Undo: Not possible, agent-1 asked › you decide, git push origin --delete checkout-v1, Deny esc and Run this command ⌘⇧⏎
    A critical request: deleting a branch on the remote.
  6. The footer shows how long is left before the request is refused for you.

Routine, careful and critical

Each request has a weight, and it looks different on screen.

  1. Routine: reads and other things with nothing to undo. Plain card. Approve with ⌘Y or ⌘⇧Y.

    A routine card: READS, kubectl get pods, Reads from outside this Mac, Nothing to undo, Run this command ⌘Y
  2. Careful: changes that may be hard to take back, like editing a config file. Amber card. Approve with ⌘Y or ⌘⇧Y (⌘⏎ also works while the card has the focus).

    A careful card: EDITS, Changes the file config/payments.yml, Undo: Unknown, Run this tool ⌘Y
  3. Critical: a push to the default branch, a deploy, deleting a remote branch, a delete with no WHERE. Red striped card. ⌘Y does nothing here: approve with ⌘⇧⏎, so the reflex that clears a test run cannot ship to production.

  4. Esc or Deny refuses at every weight. While you type in the message box, Esc never denies; ⌘Y or ⌘⇧Y there approves a routine or careful card on screen. ⌘J brings a waiting card into focus.

  5. After you decide, the card folds into one line in the chat saying what you decided.

    A decided line: PUSHES, You denied git push origin feat/checkout-v2:main

Read the flags before a big decision

  1. On a careful or critical card, a Worth knowing box lists the open flags in the work it ships: a tab that stopped, a skipped test, an assumption. Flags from every tab in the family are included.

  2. Read them and press Got it on each, or decide straight away: flags never lock the buttons.

  3. The card also says who asked, through whom: "agent-12 asked › agent-1 passed it up › you decide".

    A critical push to main with a Worth knowing box: agent-13 stopped, and Skipped the migration test, flagged by agent-12; agent-12 asked › agent-1 passed it up › you decide

Set what a tab may do without asking

Every agent tab shows its permission level in a badge in its header. Click the badge, or right-click the tab in the sidebar, and pick one:

The level stays through restarts and updates. A tab’s level also decides what it may approve for the tabs it opens: see below.

Let parent agents decide for their tabs

A tab an agent opened asks that agent for approval first, whatever the parent’s own level, so a coordinator and its workflows can run without you approving each step. The agent can approve only once, never "always". Some things always come to you.

  1. While the parent decides, the child tab shows "Waiting for agent-1 to approve …" and no dialog. Click Decide myself to take the request and get the card.

    Waiting for agent-1 to approve Bash, with a Decide myself button
  2. Always yours: database writes outside the tab's own copy, permission and mode changes, force-pushes and deleting remote branches, recursive deletes outside the tab's folder, anything touching .cocobox, "always allow", and anything the parent does not answer within 90 seconds, or within two minutes while the parent is still in the middle of a turn. A child's writes to its own database copy go to its parent.

  3. Anything the parent could do itself without asking is approved at once, with no wait, and logged in the Audit panel. The rest reach the parent together in one message, which it sees even while it works.

  4. To change this, open Settings › Safety & spend. Agents approve for the tabs they open turns it on or off. Parent agents may approve chooses between All but protected (the default) and Only their own: only what the parent could do itself without asking.

    Settings › Safety & spend: Agents approve for the tabs they open, Off / On; Parent agents may approve, All but protected / Only their own

Approve a database write

  1. Reads run without asking. Anything that is not a pure read shows the exact SQL and waits. A single-table UPDATE or DELETE is dry-run first, so the card says how many rows it would change.

    A write dialog: UPDATE refunds SET amount = amount - 1 WHERE order_id = 412; 3 rows would change, counted by a dry run; Run this statement ⌘Y
  2. Follow the shortcut shown on the card. Use ⌘Y for routine or careful requests and ⌘⇧⏎ for critical requests. A read-only connection refuses writes. More in SQL and connections.

  3. On an agent's own database copy, Allow writes to this copy stops asking about writes to that copy until the tab closes.

Check what was decided

  1. Open the Audit panel from the right panel. Every database write and DDL statement is listed the moment it is decided: approved, denied, refused by read-only or by policy, and requests an agent passed up to you.

  2. Click a row for the full statement. Where Cocobox kept the rows a write changed, undo writes them back (click again to confirm).

    The Audit panel: approved UPDATE with 3 rows and undo, denied DELETE, read-only DROP TABLE, asked you npm publish
    The log lives at ~/.config/cocobox/audit.log.