Skip to main content

Approval Gates and the Decision Model

Add the design-review/final approval gate to a runbook, check the result the agent gets back, and configure Allow proxy answers and the local decision model.

Updated
Reviewed

Most questions are just questions: the agent asks, you answer, it carries on. Some are a checkpoint you want to hold to a stricter standard. Before a design change ships, only you should be able to approve it, and only for the exact screenshots you were shown. A workflow gate enforces that. Separately, the decision model can learn how you answer and take some of the routine questions off your plate, under conditions you set. This page covers both.

The design-review/final Gate

Daintree registers workflow gates in its own code. An agent can name a gate when it asks, but it can't change one or ask for a weaker version. Settings → Integrations → Decisions → Policy lists them.

The one gate today is design-review/final:

  • Only you can answer it. No proxy, whatever your other settings.
  • The answer is Approve or Reject, and nothing else.
  • The question has to carry at least one screenshot. It doesn't need to be exactly one before and one after.

Add the Gate to a Runbook

A workflow uses the gate from your own skill, command or runbook. Daintree installs nothing into ~/.claude, ~/.codex or any other agent config, so adding the step is up to you. A design-review step reads like this:

## Final approval

1. Save the final before and after screenshots inside this worktree (PNG, JPEG or WebP),
   for example `.tmp/review-before.png` and `.tmp/review-after.png`.
2. Call `ask_human` with:
   - `question`: what changed and what you're asking to approve.
   - `workflow_gate_id`: `"design-review/final"`.
   - `attachments`: `[{ "local_resource_id": ".tmp/review-before.png", "role": "before" },
     { "local_resource_id": ".tmp/review-after.png", "role": "after" }]`.
3. Carry on with anything that doesn't depend on the answer, then end your turn.
   The answer is typed into this terminal later.
4. When it arrives, call `get_decision` with its `question_id`. Continue only if `status` is
   `human-answered`, `provenance` is `human`, `choice` is `approve` and
   `reviewed_digests_match` is `true`. On `reject`, make the requested changes and ask again.
   On `expired`, stop and report.
5. If the screenshots change, ask again: an approval covers only the images it was given.

Step 4 is the one that matters. reviewed_digests_match is true only when your answer names exactly the images that were attached, so an approval of earlier screenshots doesn't carry over to new ones, even under the same correlation_id. The fields are described on Decisions MCP Tools.

What the Gate Proves

The gate proves that the images reached you with the question, that your answer named exactly those images, and that you approved them. That holds whether you answered on your phone or in the Decisions inbox, which keeps Approve and Reject unavailable until you've opened every image at full size. It doesn't prove you studied them. It also checks the answer, not the agent: Daintree doesn't stop a workflow that skips step 4 and carries on regardless. That's the runbook's job. And only an answer counts. A follow-up in the question's thread approves nothing.

Allow Proxy Answers

By default, every question needs your own answer. Allow proxy answers, under Policy, lets a question without a gate be answered in your place, but only when the agent also asks for that: it has to pass requested_requirement as proxy-ok or proxy-first (see ask_human). A question that doesn't still needs you. And turning it on doesn't answer anything by itself: the decision model answers only after you've turned on its learning, chosen an agent CLI for it, evaluated it against your past answers, and chosen when it may answer.

A gate that needs you, like design-review/final, is never answered for you. When the model does answer, the answer is labeled as a proxy's in your terminal, in the audit trail and on your phone, and get_decision reports its provenance as proxy.

The Decision Model

The decision model learns how you answer, so it can answer some questions in your place. It's off until you turn it on, and all of it is in Settings → Integrations → Decisions → Decision model. You set it up in four steps:

  1. Learn from your answers. Keeps the questions you answer from your phone on this computer: the question with its context and options, your answer and any note, its project, and when it was asked and answered. Questions from Remote Hosts, setup-check questions, and answers with neither a choice nor any text aren't kept. The first time, Settings shows what is kept and what is sent, and learning stays off unless you choose Turn on learning. Credentials in common formats (API keys, tokens, private keys) are removed from the text before it's kept. Other sensitive text stays, and the history isn't encrypted.
  2. Agent CLI. Chooses what the model runs on: Claude Code, Codex CLI or Gemini CLI, each the copy already installed and signed in on this computer, or None, which keeps learning and sends nothing. The CLI runs only when the model is evaluated or asked a question, and then sends that question, its context and options, and your past answers like it, to its provider.
  3. Evaluate. Replays your past answers through the CLI. Each past question is predicted from only the answers you gave before it was asked, one at a time, so an evaluation can take many minutes. It keeps running if you close Settings, and Cancel stops it. The report says how often the model answered and how often it matched you, overall and by the model's confidence.
  4. Answer automatically. Offers only the confidence levels the report supports: at least 30 replayed answers at or above that level, with 90% of them matching yours. Until you choose one, the model answers nothing.

When a new evaluation finishes, its report stops automatic answers until you choose again; one still running, or canceled, leaves them as they were. To pause automatic answers straight away, change Answer automatically back before you evaluate. Switching to another CLI also stops them, since a report is about the CLI it ran on. Turning learning off keeps what it learned. Clear history deletes what the model learned and its latest evaluation, after you confirm, and stops automatic answers.

Note
Like dictation on your phone, the decision model sends question content beyond your relay and devices. With a CLI chosen, questions and your past answers go to that CLI's provider (Anthropic, OpenAI or Google, unless you've set the CLI up to use another). Decisions Privacy and Data has the details.