# The agent in a workspace

**Spinbox is experimental: APIs change and data may be lost.** What is built and what proves it is on [Status](https://docs.spinbox.dev/reference/status.md); what Spinbox does not do is on [Limitations](https://docs.spinbox.dev/overview/limitations.md).

> Open T3 Code in a workspace, sign Claude Code and Codex in once, and see what the agent reaches, where its chats live and how it drives other workspaces.

A workspace can run an agent UI of its own. [T3 Code runs in the workspace as its agent
user](https://docs.spinbox.dev/reference/status.md#workspaces),
`spin-agent-t3`, and drives Claude Code and Codex from a browser: threads, checkpoints, and
switching between them. It is built and tested, and it is also the part of Spinbox with the least
day-to-day use so far.

## Open it

```bash
spin agent <workspace>
spin agent <workspace> <path> --start
```

The server listens on the workspace's loopback alone. Your own SSH session forwards it to your
computer, and the command prints a link that pairs your browser with it. `--port` picks the
local port. Ctrl-C ends the forwarding, not the server. `path` defaults to the project's
checkout, or to `/workspace` in a workspace with no project.

The workspace's Agent tab in the dashboard opens the same server. It frames the client and
carries it over your passkey's session.

You do not start or stop the server yourself. [The supervisor starts it when you ask, and stops
it once nobody uses it and no chat is at
work](https://docs.spinbox.dev/reference/status.md#workspaces).
Every flag is in [`spin agent`](https://docs.spinbox.dev/reference/cli/agent.md).

## Sign in once

[You sign Claude Code and Codex in from the agent's
page](https://docs.spinbox.dev/reference/status.md#workspaces).
Each is the CLI's own login, run by the supervisor as the agent's user. The credentials stay in
the agent's home and never pass through the page.

[One login signs in every workspace of
yours](https://docs.spinbox.dev/reference/status.md#workspaces),
plain or a project's. Each workspace hands back every refresh and logout. A workspace that names
a guest holds none.

This is a known gap: whoever runs code in one of your workspaces holds the provider token of
all of them, until you log out or revoke it at the provider. See [Known
gaps](https://docs.spinbox.dev/reference/security/known-gaps.md).

## What it reaches

The agent's user has no capability and is given only `path`. [Its traffic is marked, and it
reaches only brokered
names](https://docs.spinbox.dev/reference/status.md#network).
An administrator decides which names those are: see [An agent without keys](https://docs.spinbox.dev/use/agent-keys.md).

## Chats and the agent's home

```bash
spin workspace threads <workspace>
```

[The workspace lists the agent's
chats](https://docs.spinbox.dev/reference/status.md#workspaces)
as its supervisor last reported them: a title, the directory, the model and a time. Never a
message. You read a chat in T3 Code.

[The agent's home is a volume of its
own](https://docs.spinbox.dev/reference/status.md#workspaces),
mounted at `/home/spin-agent-t3`. Erasing a workspace leaves its home yours, unmounted. A new
workspace mounts it when it is created and finds the chats there.

```bash
spin agent home list
spin workspace create --agent-home <id> --wait
spin agent home delete <id>
```

`delete` erases a home no workspace mounts: its chats, its key and its bytes.

## Driving other workspaces

`spin` in a workspace needs no login of its own. [An agent there drives other workspaces on a
key it gets for the workspace's
identity](https://docs.spinbox.dev/reference/status.md#access).
The key is a child of the key that made the workspace. It holds no more than that key, and goes
when the workspace goes to the trash.

```bash
spin -o json workspace list
```

The call goes through the workspace's host, whatever the workspace's network allows: an agent
in an `offline` workspace drives others too. For keys, scopes and review, see [Agents and
automation](https://docs.spinbox.dev/use/agents.md).
