Recipe: Risky commands wait for a person
An agent frees up disk space, but any command that deletes a folder, pushes code or drops a table waits for a person to approve it. What it does, when to use it, how to make it yours, and what a run costs.
Gives an agent a shell and a cleanup job, and adds the flow's own hold rules: any command that deletes a folder, pushes code or drops a table waits for a person to approve it. Everything else runs straight away. Your organization's own rules on the Policies page apply as well.
| At a glance | Notes |
|---|---|
| Level | Advanced |
| Category | Safety |
| Shape | An agent whose deletes and pushes are held |
| Plan | Free and up |
| Needs a Claude key | Yes |
| Limits it comes with | 1 loop, 1800 seconds, $0.40 |
| Commands that wait for a person | Deleting a folder, pushing code and dropping a table |
Opens it in the Playground as a flow of your own. Simulate shows what a run costs. Run asks before it starts.
The steps
| Step | Block | What it does |
|---|---|---|
| Fill the disk | Run code | Fills data/ with old logs, a build cache, and a data/keep folder that must stay. |
| Agent frees space | Agent | An agent frees space with shell commands. A command that deletes a folder waits for a person. It's done when data/keep is untouched. |
| What was freed | Run command | Says how much space is left and that data/keep is untouched. |
When to use it
- An agent needs a real shell, but some commands are too risky to run without a person.
- You want the line drawn by rules you can read, not by the agent's judgment.
- You want a record of what was held, who approved it and when.
Run it
The quick way: choose Try it now under the drawing. It opens the recipe in the Playground as a flow of your own, after you sign in if you aren't yet. Simulate opens it and shows the forecast, and Run opens it and asks before it starts, with what the run will likely cost. From the dashboard instead:
- In the dashboard sidebar, open Agent Playground → Recipes and find Risky commands wait for a person. Choose Advanced to filter the list. In the builder, Recipes in the toolbar lists them too.
- Choose Use this recipe. It becomes a flow of your own, so changing it never changes the recipe.
- If you haven't yet, save your Claude key on the Secrets page. The builder offers Add a key… in the step's key list if it's missing.
- Choose Simulate to see the forecast, then Run.
- When the run waits for a person, approve or deny it from the banner, from Approvals, or from the approval email.
What you'll see: The agent deletes old log files straight away. When it runs rm -rf data/cache, the step waits: approve or deny from the banner, Approvals or the email. Denied, the agent is told and carries on another way.
Make it yours
- Change the hold rules under Policy: each is a pattern and a sentence the person sees. The JSON panel's Will wait for a person list shows which steps a new rule catches.
- Use it for any agent with a shell: deploy scripts, database work, file cleanup.
- Rules for every flow and sandbox belong on the Policies page; a flow's rules add to them, never loosen them.
What a run costs
These are the builder's own forecast for the recipe as it comes, with its limits, rounded. Simulate shows the same numbers for your version, and they change as you change the flow.
| Notes | Typical | 1 in 10 runs | At most |
|---|---|---|---|
| Sandbox time | $0.0009 | $0.001 | $0.02 |
| Claude, on your key | $0.04 | $0.11 | the run's spend limit |
| How long it takes | 69 seconds | about 2 minutes | 1800 seconds |
A typical run uses $0.0009 of sandbox time, so about 1,200 runs cost $1, and every plan includes $5 of usage a month. The time includes a person taking a minute or two to answer the approval. The clock, and the sandbox, keep running while the run waits. Claude is billed by Anthropic to your own key, at their usual prices. The run counts it toward its spend limit, so it can't overspend, but we don't charge you for it. At most is the most a run could cost with these limits: it stops at $0.40 or 1800 seconds, whichever comes first.