# Close a bug straight from the ticket

> The bug-from-ticket squad is a Tallos playbook built on the Custom template with a task link from GitHub, GitLab, Linear or Jira. A leader agent reads the ticket, one member reproduces the bug with a failing test, another fixes the root cause, a third reviews, and the squad stops so you can accept or discard the fix.

- Canonical: https://runtallos.com/squads/bug-from-ticket
- Português: https://runtallos.com/pt/squads/bug-a-partir-do-ticket.md
- Updated: 2026-09-29
- Section: Squads

## Key facts

- Template: Custom + task link
- Links from GitHub, GitLab, Linear or Jira
- Reproduce → fix → review, in that order
- Suggested limits: 4 rounds · 3 members at once
- Ends with a fix and a regression test

## When should you use the bug-from-ticket squad?

Use it for bugs that are already written up in a tracker and can be reproduced in code. The squad forces the discipline most quick fixes skip: prove the bug with a failing test, fix the cause, then have someone else read the fix.

- **Good fit:** a backend bug with clear steps, such as duplicates, wrong totals or a race on retry.
- **Good fit:** a regression with a known "worked in version X" reference.
- **Poor fit:** a vague report ("checkout feels slow"). Turn it into a measurable target and use [best of three](https://runtallos.com/squads/best-of-three).

## How do you set up the squad?

Open **Squads → New squad**, pick **Custom** and paste the ticket URL in **Task link (optional)**. The field accepts GitHub, GitLab, Linear and Jira links; anything else shows "Use a GitHub, GitLab, Linear or Jira link." Custom starts with one empty member, so add three and write each function yourself.

| Role | Agent (example) | What it does |
| --- | --- | --- |
| Leader | Claude Code | Reads the ticket, runs reproduce → fix → review in order, and writes the report. It does not write code. |
| Reproducer | Gemini CLI | Reproduces the bug with a failing test. |
| Fixer | Codex | Fixes the root cause until the test passes. |
| Reviewer | OpenCode | Reviews the fix and the test. |

_Agents are examples. Pick any connected agent, model and effort for each role._

> **What the task link does** — Tallos passes the link and its provider to the leader as the source task, in the leader's first prompt. The leader reads the ticket with whatever tools its own agent has. If your tracker is private or the agent can't open it, paste the key facts into the objective too.

## What objective should you paste?

Restate the bug in a few lines, even with the link attached, and spell out the order of work. Then write **Leader instructions**: Custom has none by default.

```text
Fix ENG-482: webhook retries create duplicate orders.

What we know
- The payment provider retries order.paid when our endpoint is slow.
- Each retry creates a new order row with the same event id.

Done when
- A regression test sends the same event twice and gets one order.
- Existing order tests pass. No sleeps or retry hacks.
- The report names the root cause in one sentence.
```

```text
Leader instructions
Reproduce first. Start the fixer only after the reproducer's test fails
for the reason in the ticket. Then send the fix and the test to the
reviewer. If the reviewer asks for changes, send them to the fixer.
```

## What limits should you set?

Set **4 rounds** and **3 members at once**. The work is mostly sequential, so rounds matter more than parallel slots: one to reproduce and fix, one or two for review feedback, one spare.

| Setting | Recommended | Why |
| --- | --- | --- |
| Max rounds | 4 | Reproduce + fix, review, a follow-up, a spare. |
| Max members at once | 3 | One slot per role. The default 4 works too. |
| Hard ceiling | 20 rounds · 12 members | The leader cannot start members past your limit. |


> Paste your next ticket link into a squad and let it reproduce the bug first. → https://runtallos.com/signup

## How does the run go?

An example run with a Linear ticket. The ticket, code and diff are illustrative.

1. **The leader reads the ticket** — It opens ENG-482 and plans: reproduce first, then fix, then review.
2. **Reproduce** — The reproducer writes a failing test: the same event id creates two orders.
3. **Fix** — The fixer adds an idempotency key to order creation. The test passes.
4. **Review** — The reviewer approves and suggests a unique database index as a backstop.
5. **A question for you** — Should the unique index ship in this change or in a separate migration? You answer: separate.
6. **Report** — The leader files the report with `tallos squad report` and the run waits for your review.

## What will the leader ask you?

Bug squads ask about scope and facts the ticket left out. The leader asks with `tallos squad ask`; you pick an option or type your own answer.

- "Add the unique index in this change or in a separate migration?"
- "The ticket's steps don't reproduce it locally. Do you have a sample payload?"
- "Existing duplicates are in production data. Clean them up here or leave it to ops?"

## What do you get at the end?

- **Final report:** root cause, the fix, the regression test and open risks. In the example: order creation had no idempotency key, so each retry created an order; regression test added; unique index left for a separate migration.
- **Results by worktree:** the fixer's worktree marked **Recommended**, with **View changes**.
- **Accept or Discard:** Accept turns the recommended row into **Open to create PR**. Link the PR to the ticket as you normally would.

Before you accept, check that the test fails without the fix. Our guide on [reviewing AI-generated code](https://runtallos.com/learn/review-ai-generated-code) covers what else to look at.

## What variations work well?

- **Two fixers.** When the root cause is unclear, set **How many** to 2 on the fixer and ask the leader to compare, like [best of three](https://runtallos.com/squads/best-of-three).
- **Skip the reproducer.** For a bug that already has a failing test, use [build and review](https://runtallos.com/squads/build-and-review) with the ticket link.
- **Save it once.** **Save as squad** keeps the three roles. Next bug, change only the link and the objective.

## What are the common mistakes?

- **Pasting only the link.** If the agent can't read the ticket, the leader is guessing. Restate the bug in the objective.
- **Fixing before reproducing.** Without a failing test, you can't tell a fix from a coincidence. Say the order in the leader instructions.
- **Allowing symptom patches.** Ban sleeps, retries and try/catch-and-ignore in the objective.
- **Trusting the ticket blindly.** Ticket text becomes part of the leader's context. Read it before you start.

New to squads? Walk through [your first squad](https://runtallos.com/learn/your-first-squad), see how [squads](https://runtallos.com/features/squads) work, or read how the leader talks to Tallos through the [Tallos CLI](https://runtallos.com/features/tallos-cli-and-skills).

## Frequently asked questions

### Which issue trackers can I link to a squad?

GitHub, GitLab, Linear and Jira. Paste the issue URL into Task link; other links are rejected.

### Does Tallos import the ticket description into the squad?

Tallos gives the leader the link and the provider as the source task. The leader reads the ticket with the tools its agent has, so restate the essentials in the objective to be safe.

### Why reproduce the bug before fixing it?

A failing test proves the bug exists and becomes the regression test once the fix lands. It also tells the fixer exactly what "done" means.

### Does the squad close the ticket or open the pull request?

No. The squad stops for your accept or discard. After you accept, open the recommended worktree to create the PR and update the ticket as usual.

### What if the squad can't reproduce the bug?

The leader asks you for what's missing, such as a sample payload, or reports that it couldn't reproduce it. Nothing is fixed on a guess.

### Can I use a GitHub issue instead of a Linear ticket?

Yes. GitHub, GitLab, Linear and Jira links all work the same way.

---

**Run your agents in parallel with Tallos** — Claude Code, Codex, Gemini and 30+ agents — each in its own workspace, with squads, chat, terminals and review in one app. Uses the subscriptions you already have.

https://runtallos.com/signup (macOS 13+ · Windows 10+)
