quiet robot
← All insights

Guide · · 7 min read

Let it run without watching: approvals, limits and rewind

What it takes to stop watching an AI agent: a person's OK before anything real happens, limits on loops, time and spend that live outside the agent, a forecast before you press Run, and a way back when a run goes wrong.

The point of an AI agent is that it works while you do something else. It tries a fix, checks it, tries again. That's also what makes people nervous. An agent left alone can try forever, spend money the whole time, or do something you would have said no to.

So most people end up watching, tab open, hovering over the stop button. That isn't saving anyone time.

Agent Playground is an agent orchestration layer you can see, and it's built so you can walk away. Here is what has to be in place before you stop watching.

A flow you can leave alone: the agent works on its own, and a person says yes before anything real happens.Run tests (Run command), Agent fixes it (Agent), Ship this fix? (Approval), Ship (Run command), Not shipped (Output). Arrows: Run tests to Agent fixes it on Failed; Agent fixes it to Run tests on Done; Run tests to Ship this fix? on Passed; Ship this fix? to Ship on Approved; Ship this fix? to Not shipped on Denied.FailedDonePassedApprovedDenied>_ RUN COMMANDRun tests◉ AGENTAgent fixes it✋ APPROVALShip this fix?>_ RUN COMMANDShip⚑ OUTPUTNot shipped
A flow you can leave alone: the agent works on its own, and a person says yes before anything real happens.

1. A person says yes before anything real happens

Some steps can't be undone: deleting files, sending an email, publishing a change, charging a card. Those are the steps you want a person to see first.

An Approval box pauses the run at that point with your question, like "Ship this fix?" or "Delete these reports?". It has two exits, Approved and Denied, and you decide where each one goes. A "no" can end the run cleanly, with nothing shipped.

You don't need to be at your desk to answer. A waiting step:

  • shows as waiting in the run,
  • appears on the Approvals page in the dashboard, which works on a phone,
  • and sends the usual approval email to your team, if your organization has approval emails turned on.
The Approvals page on a phone: Delete them? from Tidy up old reports, with the question, and Approve and run and Deny buttons.
A waiting approval on a phone. Read the question, then choose Approve and run, or Deny.

An API key can't approve. Approving takes a signed-in person, so an agent can never approve its own work.

There are two more ways to make a run wait. Tick Ask a person first on any step, and it waits before it runs; on an agent, every command it runs and every file it writes waits. And your organization's own approval rules, such as for rm -rf, sudo or git push, hold matching commands in every run, even on loop seven at midnight. Tutorial 2 builds an approval flow in about ten minutes and has you approve it from your phone.

2. Limits that live outside the agent

An agent shouldn't decide when it has done enough. Every flow has three limits, set by you:

Limit What counts Default
Loops Each trip back round a loop 5
Time Seconds from the first step, including time waiting for a person 300
Spend Sandbox time plus AI usage $0.25

A run stops at whichever comes first. The limits are checked on our side, not in your browser, so a run stops on time even if you close the tab or lose your connection. A command that's running when a limit is reached is stopped within a couple of seconds.

An Agent step has its own limits on top: Turns and Spend on the model. Whichever is reached first, the agent's or the run's, stops it.

One thing to plan for: the Time limit keeps counting while a step waits for a person. If nobody answers before it runs out, the run stops and nothing after the approval happens. That's the safe way round, but give flows with approvals enough time, like 900 seconds or more. Limits and safety has the full ranges.

3. Know the worst case before you press Run

Loops are hard to price in your head. Will the fix pass on the second try or the ninth?

Press Simulate and in a second or two, at no cost, you get a forecast for the flow with the limits you set:

  • Typical: what half of runs come in under, in cost, time and loops.
  • 1 in 10: a bad day. One run in ten costs or takes more than this.
  • At most: the most a run can cost with your limits, and which limit stops it there.
The Forecast card: sandbox cost $0.0002 typical and $0.0003 one run in ten, time 15 s and 22 s, loops 2.3 and 5; 82% of simulated runs finish and 18% stop at the loop limit; at most $0.0023, set by the 180-second time cap.
A forecast from 2,000 simulated runs, before anything runs for real.

It also shows how runs tend to end, what Claude will likely cost on your key, and which steps your policy will likely hold.

At most is the number that lets you sleep. If it's more than you'd want to spend, lower Spend or Time. If the loop limit stops a large share of simulated runs, raise Loops or improve the step that keeps failing. Runs, replay and compare explains each number.

4. Watch a limit do its job: the Runaway loop

The best way to trust a limit is to watch one stop something. The Runaway loop recipe retries a check that will never pass, on purpose.

The Runaway loop recipe: Check always fails, so the loop limit stops the run and the sandbox goes back to Start.Start (Run command), Try again (Run command), Check (Run command), Done (Output). Arrows: Start to Try again; Try again to Check; Check to Try again on Failed; Check to Done on Passed.FailedPassed>_ RUN COMMANDStartgo back here>_ RUN COMMANDTry again>_ RUN COMMANDCheckalways fails⚑ OUTPUTDonenever reached
The Runaway loop recipe: Check always fails, so the loop limit stops the run and the sandbox goes back to Start.

It comes with limits of 4 loops, 120 seconds and $0.05, and needs no Claude key. Simulate says it before you run: nearly every run will hit the loop limit. Press Run and the loop goes round four times, then the run ends as Stopped at a limit, with the loop limit named as the reason.

The Runaway loop recipe in the builder after a run, with each step's result on the canvas and the run's steps listed on the right.
A real run of the recipe. The panel on the right lists every step with what it printed.

A typical run costs about $0.0002. Tutorial 3 builds a retry loop of your own and has you set Loops to 1 to see it stop.

5. Rewind when a run is stopped

Stopping a run is half the job. A loop stopped halfway through a change can leave files half edited.

After each step that passes, the sandbox saves a checkpoint. Pick the last step that leaves things clean, open Advanced and turn on Go back here if a limit stops the run. If a limit stops the run, the sandbox goes back to how it was after that step, so none of the half-finished attempts are left behind. In the Runaway loop recipe, that's the Start step.

Checkpoints are kept for 24 hours after the run. In a finished run you can open any step that saved one and start a new sandbox from it, to look at the files as they were or to carry on by hand. Checkpoints and rewind has the details.

6. In the morning: replay what happened

When you come back, every run is under Recent runs. Replay shows each step's output, time and cost. Open an Agent step to read it turn by turn: what Claude said, each command it ran, any command a rule held, and the tokens each turn cost. Then compare two runs side by side to see whether a change helped. Runs, replay and compare has the full tour.

7. Your organization's rules apply to every step

You don't have to repeat your rules in each flow. Each step runs with your organization's command and network rules, and a flow can add to them but never loosen them. A flow's Policy can narrow the network to a short list of sites or none, and a single step can run with No internet for this step, which suits an agent's fix or a downloaded script.

When a person or a rule refuses an agent's command, the agent is told, and told not to work around it. Every command, approval and blocked connection is written to your organization's audit log. Policy covers the rest.

8. AI steps use your key, and the sandbox never holds it

AI steps use your own Claude key, saved once under Policies → Secrets. The key never enters the sandbox. Code in the sandbox, including whatever an agent writes, only sees a stand-in that's useless anywhere else, and the real key is added on the way out. We explain how in Your keys never enter the sandbox.

Each key can also have its own budget for one run and for one month. Past the budget, the AI step stops instead of spending more. And Claude's usage counts toward the flow's Spend limit, so a chatty agent stops at the same limit as everything else.

Try it today

  1. Open Agent Playground and choose the Runaway loop recipe. Press Simulate, then Run, and watch the limit stop it.
  2. Open a flow of your own and put an Approval before the step that can't be undone.
  3. Set Time to give a person room to answer, check At most in the forecast, and tick Go back here if a limit stops the run on the last clean step.
  4. Run it, close the tab, and approve from your phone when the email arrives.

The Safety recipes and Limits and safety are good next stops.