Skip to content

Plan-first workflows

Use when: you want the model to think through the change first, commit that thinking to an artifact a human can review, and only then start editing. Common in code-review flows, migrations, change-management environments, and unattended runs where a bad plan is cheaper to catch than a bad diff.

core-agent has a plan-first posture with two strengths, picked via permissions.plan_mode:

  • required — the permission gate refuses every non-exempt tool (write_file, edit_file, delete_file, bash, fetch_url, spawn_agent/spawn_remote_agent, and the mcp namespace) until the model has called record_plan for the current turn. The plan is a precondition. Reads through the built-in file and search tools stay exempt so the model can gather what it needs to write a plan worth reviewing. MCP reads are exempt too if the server is marked read_only: true — the gate only ever sees the namespace, never the underlying tool, so without that declaration it has no way to tell a list from a delete and gates both.
  • advisory — record_plan is registered and the artifact is persisted exactly the same way, but nothing is blocked. The plan is an audit trail: the agent records what it’s about to do and then does it in the same turn.

Delegation counts as an action (v2.9+): under required, a parent that has recorded no plan can’t spawn a subagent to do the acting for it. Both doors onto a declarative subagent are held — spawn_agent { agent: "cluster" } and the cluster(request: …) parent tool that the same roster entry registers. stop_agent is the deliberate exception and is never gated in any mode: denying a cancel leaves running exactly what the model was trying to halt.

Reach for required when a human is genuinely going to read the plan before the diff lands. Reach for advisory for unattended runs where you want the reasoning on file but there is nobody to approve it — an armed gate with no approver just stalls the run.