> ## Documentation Index
> Fetch the complete documentation index at: https://to11.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Syncing sessions

> Send your Claude Code sessions to a project by hand or after every response, choose the project they go to, and turn auto-sync off.

This guide shows you how to get your Claude Code sessions into a to11 project. For what a session is and what the dashboard shows, see [Sessions](https://to11.ai/docs/sessions/overview.md).

## Before you start

* The to11 CLI `0.36.0` or later. Check with `to11 version`; [Receiving skills](https://to11.ai/docs/skills/receiving-skills.md#install-the-cli) has the install commands.
* To be signed in, with `to11 login` or a bare `to11`. On a machine where nobody signs in, set `TO11_API_KEY` to a key with the `ingest:write` scope.
* The `ingest:write` permission on the project, which the developer, admin, and owner roles hold.

## Choose the project your sessions go to

Linking a repository with `to11` or [`to11 link`](https://to11.ai/docs/reference/cli/commands#to11-link) writes `.to11/sessions.yaml` in it, naming the project the skills come from. Linking your home writes `~/.to11/sessions.yaml`. In most cases there is nothing more to do.

To send a repository's sessions to a different project, edit `project` in its `.to11/sessions.yaml`:

```yaml theme={null}
organization: acme   # the organization the project is looked up in
project: acme/web    # workspace/project, or a proj_ id
```

The file is yours, not the team's: the CLI keeps the repository's `sessions.yaml` out of git. A repository's file comes before the one in your home, and `--project`, `TO11_PROJECT`, or `TO11_PROJECT_ID` come before both for a single run. See [`sessions.yaml`](https://to11.ai/docs/reference/cli/configuration#sessionsyaml) for every key.

## Send sessions by hand

Run `to11 session sync` inside the repository:

```bash theme={null}
to11 session sync
```

```text theme={null}
Synced 3 sessions to acme/web (1 new, 2 updated).
https://app.to11.ai/p/proj_01M5YCXC5YA0Y30M4S13KWQ4H7/sessions
```

It sends the sessions started at the repository's root, in a subdirectory, or in one of its worktrees, and only the lines added since the last run. The link opens the project's **Sessions** page.

To narrow a run:

| To | Run |
| - | - |
| Send only the sessions active in the last week | `to11 session sync --since 7d` |
| Send one session, started in any directory | `to11 session sync --session <session-id>` |
| Send a session without its subagents' transcripts | `to11 session sync --no-subagents` |
| Send to another project this once | `to11 session sync --project acme/other` |

A run covers the newest sessions whose transcripts come to 512 MB together. If older sessions were left out, the CLI says so on stderr; `to11 session sync --max-size 0` sends every session.

## Send sessions automatically

Turn on auto-sync for the repository you are in:

```bash theme={null}
to11 session autosync on
```

From then on, the to11 plugin sends the session after each Claude Code response and when the session ends, as `to11 session sync` would. To turn it on for every repository, add `--global`; a repository's own setting still comes before the global one.

Auto-sync needs the [to11 plugin](https://github.com/to11ai/to11-code-plugin) 0.5.0 or later in Claude Code. `to11` and `to11 link` offer to install it, and `to11 ui` installs or updates it. If the plugin is missing, `to11 session autosync on` says so.

To see the setting that applies in the current repository, run the command without an argument:

```bash theme={null}
to11 session autosync
```

## Turn auto-sync off

```bash theme={null}
to11 session autosync off
```

Use `--global` to turn off the setting for every repository. Sessions already uploaded stay in the project.

## If a sync stops

| Message | Fix |
| - | - |
| `no project for these sessions` | Run `to11 link` in the repository, or pass `--project` |
| `not signed in` | Run `to11 login`, or set `TO11_API_KEY` |
| `no such project: <name>` | Check the `project` in `sessions.yaml` against the dashboard; it reads `workspace/project` |

## Next steps

> [card] [Sessions](https://to11.ai/docs/sessions/overview.md)
>
> What the Sessions page shows, the cost estimate, and who can read it.

> [card] [CLI commands](https://to11.ai/docs/reference/cli/commands.md#to11-session-sync)
>
> Every flag of `to11 session sync` and `to11 session autosync`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.