---
title: Recipe: Risky commands wait for a person · Agent Playground docs
description: 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.
url: https://www.quietrobot.ai/docs/playground/recipes/risky-commands
---

# 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 | |
|---|---|
| **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 |

```flow
{"recipe": "risky-commands", "title": "Risky commands wait for a person, as it is on the canvas.", "nodes": [["setup", "code", "Fill the disk"], ["clean", "agent", "Agent frees space"], ["report", "run", "What was freed"]], "edges": [["setup", "clean"], ["clean", "report", "Done"]]}
```

## 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:

1. 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.
2. Choose **Use this recipe**. It becomes a flow of your own, so changing it never changes the recipe.
3. If you haven't yet, [save your Claude key](https://www.quietrobot.ai/docs/playground/ai-steps#add-your-claude-key) on the **Secrets** page. The builder offers **Add a key…** in the step's key list if it's missing.
4. Choose **Simulate** to see the forecast, then **Run**.
5. 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

1. 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.
2. Use it for any agent with a shell: deploy scripts, database work, file cleanup.
3. 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.

| | 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.

## Related

* [Approvals](https://www.quietrobot.ai/docs/sandboxes/approvals)
* [Limits and safety](https://www.quietrobot.ai/docs/playground/safety)
* [First look at an alert](https://www.quietrobot.ai/docs/playground/recipes/alert-first-look)
* [All recipes](https://www.quietrobot.ai/docs/playground/recipes)
