---
title: Recipe: Reproduce a bug from an issue · Agent Playground docs
description: Reads a bug report, writes one small test after another until one fails the way the report says, then drafts the reply. 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/bug-repro
---

# Recipe: Reproduce a bug from an issue

Reads a bug report, writes one small test after another until one fails the way the report says, then drafts the reply. What it does, when to use it, how to make it yours, and what a run costs.

Reads a bug report, then writes one small test after another until one fails exactly the way the report describes. It drafts a reply with the test that shows the bug, or a question for the reporter if nothing reproduced it.

| At a glance | |
|---|---|
| **Category** | Coding |
| **Shape** | A loop with two ways out |
| **Plan** | Free and up |
| **Needs a Claude key** | No |
| **Limits it comes with** | 4 loops, 180 seconds, $0.05 |

```flow
{"title": "Reproduce a bug from an issue, as it is on the canvas.", "nodes": [["setup", "run", "Check out the code"], ["write", "code", "Write the next test"], ["run", "branch", "Does the test pass?", "no internet"], ["match", "branch", "Fails as described?"], ["comment", "run", "Draft the repro comment"], ["ask", "run", "Ask for more detail"]], "edges": [["setup", "write"], ["write", "run"], ["write", "ask", "Failed"], ["run", "write", "Yes"], ["run", "match", "No"], ["match", "comment", "Yes"], ["match", "write", "No"]]}
```

<figure class="shot">
  <img class="art-light" src="/docs/playground/recipes/bug-repro-light.webp" alt="The Reproduce a bug from an issue recipe in the builder after a run, with each step's result on the canvas and the run's steps listed on the right." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/recipes/bug-repro-dark.webp" alt="" width="1440" height="900" loading="lazy">
  <figcaption>A real run of the recipe. The panel on the right lists every step with what it printed.</figcaption>
</figure>

## When to use it

* A bug report comes in and someone has to confirm it before anyone fixes it.
* You want proof of a bug (a failing test) rather than a guess.
* An agent should try ideas, but only count it as success on the right failure.

## Run it

1. Open **Agent Playground** in the dashboard and find **Reproduce a bug from an issue** under **Start from a recipe**. 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. Choose **Simulate** to see the forecast, then **Run**.

**What you'll see:** A couple of tests pass, so the bug didn't show, and the loop tries again. Then one fails with the same wrong total the report describes (19.00 instead of 18.00), **Fails as described?** says **Yes**, and the comment is drafted. Nothing is posted.

## Make it yours

1. Feed in a real issue: save it as a file in the first step, or start the flow from a webhook and read it from `.qr/trigger.json`.
2. Replace **Write the next test** with an **Agent** whose goal is `Write one failing test that shows this bug`, with the issue added through **Insert…**.
3. Keep both **Decide** checks: they stop the agent from claiming success on a different failure.
4. Have **Draft the repro comment** post to your issue tracker with a saved token, after an approval if you like.

## 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.0002 | $0.0002 | $0.0023 |
| **How long it takes** | 12 seconds | 17 seconds | 180 seconds |

A typical run uses $0.0002 of sandbox time, so about 6,400 runs cost $1, and every plan includes $5 of usage a month. **At most** is the most a run could cost with these limits: it stops at $0.05 or 180 seconds, whichever comes first.

## Related

* [Tutorial 3: Keep trying until it works](https://www.quietrobot.ai/docs/playground/tutorials/loops)
* [Agent fixes the failing test](https://www.quietrobot.ai/docs/playground/recipes/agent-fix-test)
* [Coding recipes](https://www.quietrobot.ai/docs/playground/recipes/coding)
* [All recipes](https://www.quietrobot.ai/docs/playground/recipes)
