---
title: Track issues while you code
description: Have your AI record bugs and follow-up work as it codes, so it can act on findings in the current conversation or a later session.
slug: /guides/track-issues-while-you-code
order: 2
visibility: public
redirects_from: []
---

# Track issues while you code

Prompt:

> Fix issue #543.

Also works: "Investigate the sign-in failure in issue #543." "Fix the unclaimed urgent bugs in the sign-in flow."

Keep the current fix focused while recording other defects and follow-up work. Your AI can return to those issues during this conversation or in a later session.

Once you use tzTrack for the project, its MCP instructions direct your AI to read existing issues, record findings, and update progress as it works. You do not need to ask for that recordkeeping with each task.

You still choose what your AI should fix, or give it a scope within which to choose work. Recording an issue does not authorize unrelated code changes. To have it work at intervals, set up a recurring process in your AI tool or another scheduler; tzTrack does not start coding sessions.

The Turn Zero connection lists tzTrack tools with `tztrack_` before the name: `find` is `tztrack_find`. This page uses the shorter names. [The tools](/tztrack/reference/the-tools/) lists the full names.

## What your AI tool does

- Reads existing issues before starting and claims the work it takes.
- Records other bugs, gaps, questions, and follow-ups without losing focus on the current fix.
- Adds progress and evidence, then records the result and any verification still needed.

## Before your AI starts

- Select the project's space; read `.tztrack/config.json` if available.
- Read current issues and claims, including findings from earlier in this conversation.
- Confirm the permitted coding scope and access needed for issue updates or closure.

## Steps

These instructions are for your AI tool.

### 1. Read what is open

Use `find` to review open issues, giving priority to urgent work, decisions waiting for the person, and approaching due dates.

### 2. Work the fix

Read the issue and claim it with a distinct label, such as `session:<id>`. Start only after the claim succeeds; if another session claimed it first, leave it alone. Keep immediate coding steps in your own task list.

### 3. Record findings and follow-up work

For another bug, missing test, or follow-up, search first. Add progress to an existing issue or use `raise` for a new point, with the evidence and a suggested next step. Follow up during this conversation or a later session as the agreed scope allows.

### 4. Record decisions that need the person

Record the decision needed in **Waiting for**: `person` for the space's owner, or `person:<account>` for another member. See [Waiting and claims](/tztrack/concepts/waiting-and-claims/).

### 5. Record the result and report

Record what you changed and how you checked it. Close completed work with an outcome and resolution when appropriate; a tracked software fix may stay `fixed` until verification completes. [Why fixed is not closed](/tztrack/concepts/issues-and-kinds/#why-fixed-is-not-closed) explains the distinction. Then list the issues you raised, by number.

## Expected result

The issue records the result and any verification still needed. Other findings have their own issues, which your AI can revisit with `find` during this conversation or in a later session.

## Refusals

Common refusals are below; [Refusals](/tztrack/reference/refusals/) lists the rest.

| Refusal | Status | Cause | Remedy |
| --- | --- | --- | --- |
| `issue_not_found` | 404 | The issue is not in the selected space. | Check the space and issue number. |
| `lease_conflict` | 409 | Another claim holds the issue. | Leave that work to its current worker. |
| `state_conflict` | 409 | The action does not fit the current state. | Read the issue and reopen it first when required. |

## Related

- [The tools](/tztrack/reference/the-tools/) gives `claim`, `wait`, and `update`.
- [Waiting and claims](/tztrack/concepts/waiting-and-claims/) explains claims and waiting for your person.
- [Issues and kinds](/tztrack/concepts/issues-and-kinds/) helps choose an issue's kind.
- [What happens without asking](/tztrack/concepts/what-happens-without-asking/) says what your AI does on its own.
