---
title: Track issues while you code
description: Have your AI keep what it finds while coding in tzTrack, so work it does not finish today is there for the next session.
slug: /guides/track-issues-while-you-code
order: 1
visibility: public
redirects_from: []
---

# Track issues while you code

Prompt:

> While you fix this, keep track of anything we find that we won't get to today.

Also works: "Note the other bugs you see, I'll deal with them later." "Pick up where yesterday's session left off."

## What your tool does

- Reads your open issues with `find` at the start of its work: the urgent ones, the ones waiting for you, and the ones near their due date.
- Keeps the steps of this fix in its own task list, and puts in Turn Zero Track (tzTrack) only what must outlast the conversation.
- Searches with `find` before it raises, and comments on an issue that already holds the point.
- Raises each new point with `raise`, one point per issue, with what it saw and a suggested resolution.
- Claims an issue with `claim` before it works on it, and comments when it takes or finishes it.
- Closes what it fixed with `close`, with the outcome and what it did.
- Lists the issues it raised, by number, when it finishes.

## Before your AI starts

This section is for your AI coding tool: what it checks and gathers before it begins. You don't need to do these steps yourself.

- The space the project uses. If `.tztrack/config.json` is at the project's top level, pass its `space` in every call.
- The open issues, read with `find`, so the work starts from what earlier sessions left.
- The issues another session has claimed: their claim says which session holds them. Leave them alone.

## Steps

### 1. Read what is open

Call `find` for the open issues. Read the urgent ones, the ones waiting for your person, and the ones near their due date first, and tell your person what is open.

### 2. Work the fix

Read the issue the fix belongs to with `read`. If no other session has claimed it, claim it with `claim`, such as with the label `session:<id>`. Keep the steps of the fix in your own task list.

### 3. Raise what outlasts the conversation

When you meet a second bug, a missing test, or a step only your person can take, search with `find` first. If no issue holds the point yet, `raise` one issue for it. Give its kind, what you saw, and a suggested resolution.

### 4. Hand on what only your person decides

When only your person can act or decide, mark the issue waiting for them: call `wait` with `waiting_for` set to `person`. The issue stays open, and nothing closes it on its own.

### 5. Close and report

Close the issue you fixed with `close`, the outcome `done` or `verified`, and what you did. Then list the issues you raised, by number.

## Expected result

The fix's issue is closed with what was done. Each point found along the way is its own open issue, and your person has the list of their numbers. The next session reads them with `find`.

## Refusals

This table lists the refusals this task most often meets; [Refusals](/reference/refusals) lists every refusal with its cause and remedy.

| Refusal | Status | Cause | Remedy |
| --- | --- | --- | --- |
| `issue_not_found` | 404 | No issue of the space holds that number. | Check the number with `find`. |
| `state_conflict` | 409 | The act does not fit the issue's state, such as a change to a closed issue, or a `waiting_for` other than `evidence` on a `waiting` issue. | Bring the issue to a state that fits first, such as `reopen` before changing a closed issue or a waiting one. |
| `credential_required` | 401 | The call carried no sign-in, or the sign-in did not finish. | Sign in again through your tool. |

## Related

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