---
title: Use one space across sessions
description: Save the project's tzTrack space in .tztrack/config.json so AI sessions can select the right issue database without asking each time.
slug: /guides/use-one-space-across-sessions
order: 8
visibility: public
redirects_from: []
---

# Use one space across sessions

Prompt:

> Make every session in this project use the same tzTrack space.

Also works: "Save which issue space this repo uses." "Set this project up so every session uses one tzTrack space."

This is a one-time setup request. Once the file exists, your AI reuses it without needing the prompt again. A project that uses tzTeam needs no such setup: tzTeam keeps the space in `.tzteam/config.json`, and your AI tool uses tzTeam's issue tool instead.

## What your AI tool does

- Reuses the project's existing setting file if there is one.
- Helps you select an existing space, makes your first space if you have none, and asks before making any further one.
- Saves the selection with your approval and uses it in later calls.

## What you need

- A signed-in [Turn Zero connection](https://turnzero.ai/cloud/getting-started/connect-your-tool/).
- A project folder your AI tool can read and write. A chat without file access can pass the space directly and does not need this file.

## Before your AI starts

- Read `.tztrack/config.json` if it exists; do not replace a working selection.
- Check existing owned and shared spaces before proposing a new one.
- Confirm authorization to create a further space (your first needs none) or to write the file. A prior setup request may already provide it.
- If local files are unavailable, skip the file and pass the agreed space in calls.

## Steps

These instructions are for your AI tool.

### 1. Find the space

Reuse the configured space. Otherwise, use the person's default space, which every tool uses when `space` is left out. If a tool answers `default_space_needed`, list the spaces with `tztrack_spaces` and ask which to use for the project. If it answers `space_needed`, the account has no space yet: make the first one with `create_issue_space` as the refusal's `next` says, without asking. Ask the person before making any further space.

If the account can reach exactly one space, owned or shared, the tools use it. Do not create a new space just because the account owns none.

### 2. Write the file

Once authorized, write the chosen space's actual id to `.tztrack/config.json` at the project's top level:

```json
{ "space": "6f1c2d9e-4b7a-4c3e-9a51-2d8e7f0b3c64" }
```

Replace the example id. The file contains only `space`; it holds no credentials and grants no access.

### 3. Keep the selection with the project

If the project uses version control, include the file under the person's normal commit permissions so other checkouts receive it. Otherwise, keep it with the project files.

### 4. Use it

Read the file at the start of work and pass its `space` in calls. Confirm access with a read-only request; the signed-in account still needs permission for that space.

## Expected result

Later sessions select the intended issue database from the file. Each person still signs in with their own account.

## Refusals

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

| Refusal | Status | Cause | Remedy |
| --- | --- | --- | --- |
| `space_mismatch` | 403 | The account cannot access the selected space. | Check the id and sign-in; sharing must be granted separately. |
| `invalid_request` | 400 | The space id is missing or malformed. | Use the actual id returned for the space. |
| `credential_required` | 401 | Sign-in is incomplete. | Complete sign-in through the AI tool. |

## Related

- [The setting file](/tztrack/reference/the-setting-file/) gives the file's form.
- [What happens without asking](/tztrack/concepts/what-happens-without-asking/) says why writing the file asks you first.
- [The tools](/tztrack/reference/the-tools/) says which tools take `space`.
