Agents and control
Flight recorder and undo
See every change made to your project, who made it and why, and take back one change or a whole session.
The flight recorder keeps every change to your project, whether made by you, a teammate, an AI agent or CLI itself, with the reason, exactly what changed, what it did to your bill, and an undo button.
How to use it: open a project's Activity tab. Press Undo on any change to put it back, or undo everything an agent did in one session. When an agent does something you didn't expect, look here first.
"Undo everything you changed in the last hour."
Every change to a project, by a person, an agent or CLI itself, lands in the flight recorder with its reason, exactly what changed, what it did to your hourly bill, and an undo button. When an agent does something you didn't expect, this is where you look first.
What's recorded
Each entry shows:
- Who made the change: a person, an agent's key, an agent with its own wallet, the
clicommand, or the system (for example a postmortem after an outage). - Why, in the actor's own words. Agents send a one-sentence reason with every change: the
whyargument on MCP tools, or theX-CLI-Intentheader on the API. - What changed, field by field, with a snapshot of the state before. Variables are shown by name only, never their values.
- The cost per hour before and after, so you can see which change raised the bill.
- An undo button, or "Can't undo" with the reason when a change can't be reversed.
Agents are told to read the flight recorder before changing something, and to ask you before changing back anything a person changed recently.
Give a reason with your own changes
Anything you send through the API can carry a reason too:
PATCH /v1/services/svc_web
X-CLI-Intent: Raise memory: the worker was killed for running out at 512 MB{ "plan": { "cpu": 1, "memMb": 1024 } }Read the flight recorder
In the dashboard: open the project and go to Activity, then Flight recorder. Use Show changes by to see only agents or only people.
Ask your agent:
"What changed in this project in the last hour, and who changed it?"
With the API:
GET /v1/projects/:id/flight?who=agentsEntries come newest first. The MCP tool is cli_recent_changes. For a plain list of who did what, cli audit and GET /v1/projects/:id/audit show the activity log.
Undo one change
Undo builds the reverse of a change and runs it: it restores the old settings, puts variables back to their old values (or deletes ones that were added), brings a deleted service back from the trash, removes a domain that was added, and so on.
In the dashboard: press Undo on the entry.
Ask your agent:
"Undo your last change to the api and tell me what it put back."
With the API:
POST /v1/flight/aud_7c1e40a2b9d35f86/undoThe MCP tool is cli_undo.
An undo runs as you, through every normal check. If undoing needs an approval, a second factor or more credit, you get the same answer you'd get making the change by hand, and nothing is half-done silently: the response lists which steps ran. The undo is itself recorded, linked to the change it reversed.
Undo a whole session
When an agent made a run of changes you want to take back together, undo its session. CLI groups changes by actor, so you can put back everything one agent did since a given time.
In the dashboard: the flight recorder groups an agent's run of work; undo one step or the whole run.
With the API:
List recent sessions (the last 7 days by default):
APIGET /v1/projects/:id/sessions?actor=key:key_3a9f0c21d4e7b865See the plan first with a dry run:
APIPOST /v1/projects/:id/sessions/undo?dryRun=trueJSON{ "actor": "key:key_3a9f0c21d4e7b865", "from": 1794182400000 }Send the same request without
dryRunto put everything back.
Undoing a session needs an admin. Changes people had to undo count against the agent's track record (see /docs/agent-permissions).
The intent bar
Say what you want in a sentence and CLI turns it into a priced plan before anything runs.
- Press ⌘K to open the command palette.
- Type a sentence, for example: "add a read replica to the database and give the api 2 copies".
- CLI shows the plan: each step, what it acts on, and what it adds to the hourly cost (and the most it adds per month).
- Press Enter to run it, or Esc to go back.
The intent bar understands changes like copies, size, read replicas and standbys, rollbacks, adding and connecting a database, setting a variable and redeploying, sleep, redeploys and deletes. A plan that deletes something needs you to tick a confirmation first.
Each step runs as you, so your role, approvals and spending limits apply, and each one lands in the flight recorder with your sentence as its reason.
With the API:
POST /v1/projects/:id/intent
POST /v1/projects/:id/intent/run{ "text": "double web and add a read replica to postgres" }/intent/run only accepts steps from an allow-list of plannable actions on services inside the project; deletes need "confirmDestructive": true.
Proposed changes
For production changes an agent isn't sure about, it can propose a change instead of making it. CLI builds the change in a throwaway copy of the project with scrubbed data, writes a summary with a risk level, and waits for a person.
- The agent proposes it (
cli_propose_change, orPOST /v1/projects/:id/changeswith the service, a title, and a commit, settings or variables). - You get a
change_proposedevent, thenchange_readyonce it's built. - You review it at
/changes/:idor in Proposed changes on the project's Activity tab, then apply or reject it.
From your terminal:
cli changes
cli changes chg_51b07e3a9c2d4f18 approveAn agent can't approve its own change, and keys never can. Applying one asks for your second factor if you have one.
Workspaces
A workspace is a throwaway copy of the project for one task: the services are copied, databases are copied with personal data scrubbed (or start empty), and it comes with a token that works only there, with its own spending cap.
POST /v1/projects/:id/workspaces{ "purpose": "Try the Postgres 17 upgrade", "hours": 24, "spendCap": 5000000 }A workspace can't have a bigger cap than its creator has left. It deletes itself when its time is up, unless you keep it (POST /v1/workspaces/:id/keep) or extend it. You'll find them under Agent workspaces in project Settings.