Skip to content

Database tables for machines and computers

This page lists the columns of instances, seats, coding_computers, claude_logins, screen_takeovers, secret_sets and connected_folders. Database tables says how to read the columns.

A machine of a team. kind is mac, box or check. Only the SHA-256 hash of its token is stored. A person’s own computer has personal set. seat_cap, cpus and memory_gib size a box.

Column Type Notes
id uuid key
team_id uuid references teams
name text
kind text one of box, check, mac
owner_id uuid optional; references people
token_sha256 text unique
harnesses text[] default '{claude}'
status text default 'offline'; one of online, stale, offline
last_seen_at timestamptz optional
created_at timestamptz default now()
claimed_by uuid optional; references people
claimed_by_run uuid optional; references runs
claimed_at timestamptz optional
idle_since timestamptz optional
personal boolean default false
start_error text optional
screen_width integer optional
screen_height integer optional
ready boolean default false
stopped_at timestamptz optional
seat_cap integer default 1
cpus integer default 2
memory_gib integer default 4
token_stale boolean default false
claude_account text optional; the Claude account a session started now runs on, as the machine’s heartbeat reports it

Unique (team_id, name). Unique (owner_id) where personal. Check ((NOT personal) OR (kind = 'box')). Check ((screen_width IS NULL) = (screen_height IS NULL)). Check ((seat_cap >= 1) AND (seat_cap <= 16)). Check ((stopped_at IS NULL) OR personal). Check (cpus > 0). Check (memory_gib > 0). Check (screen_height > 0). Check (screen_width > 0).

One row for each seat a computer has. Inside the computer, seat n has display :n and its browser’s DevTools port 9221 plus n.

Column Type Notes
id uuid key
team_id uuid references teams
instance_id uuid references instances
n integer
agent_id uuid optional; references agents
status text default 'free'; one of free, starting, ready
held_since timestamptz optional
last_turn_at timestamptz optional

Unique (instance_id, n). Unique (instance_id, agent_id) where (agent_id IS NOT NULL). Check ((agent_id IS NULL) = (held_since IS NULL)). Check ((n >= 1) AND (n <= 16)). Check ((status = 'free') = (agent_id IS NULL)).

A computer in a team’s coding pool. Its instance is a box with one seat. It is up from the moment the pool decides to start it, retiring once the pool decides to throw it away, and gone once its container and home volume are removed. The instance row stays.

Column Type Notes
instance_id uuid key; references instances
team_id uuid references teams
status text default 'up'; one of up, retiring, gone
retire_reason text optional; one of attempt_ended, idle, abandoned, unused
made_at timestamptz default now()
retire_at timestamptz optional
gone_at timestamptz optional

Check ((status = 'gone') = (gone_at IS NOT NULL)). Check ((status = 'up') = (retire_at IS NULL)). Check ((status = 'up') = (retire_reason IS NULL)).

One sign-in to Claude on a person’s box. The person’s code and the token never come here. The code passes through the API’s memory to the box, and the token stays in the box’s home volume.

Column Type Notes
id uuid key
team_id uuid references teams
instance_id uuid references instances
person_id uuid references people
status text default 'starting'; one of starting, waiting_for_code, checking, signed_in, failed, cancelled
url text optional
note text optional
valid_until timestamptz optional
created_at timestamptz default now()
updated_at timestamptz default now()

Unique (instance_id) where (status = ANY (ARRAY['starting', 'waiting_for_code', 'checking'])). Check ((status <> 'failed') OR (note IS NOT NULL)). Check ((status <> 'starting') OR (url IS NULL)). Check ((status <> ALL (ARRAY['starting', 'checking', 'signed_in', 'cancelled'])) OR (note IS NULL)). Check ((status <> ALL (ARRAY['waiting_for_code', 'checking', 'signed_in'])) OR (url IS NOT NULL)). Check ((status = 'signed_in') = (valid_until IS NOT NULL)).

Each time a person held a machine’s screen. The open row, with no ended_at, says who holds it now. With no open row, the agents on the machine hold it.

Column Type Notes
id uuid key
team_id uuid references teams
instance_id uuid references instances
person_id uuid references people
session_id uuid optional; references sessions
started_at timestamptz default now()
ended_at timestamptz optional
ended_by text optional; one of handed_back, left
seat_id uuid optional; references seats

Unique (seat_id) where (ended_at IS NULL). Unique (instance_id) where ((ended_at IS NULL) AND (seat_id IS NULL)). Check ((ended_at IS NULL) = (ended_by IS NULL)).

Where a secret’s value was put from the app, never the value. One row for each secret name a computer holds because someone set it from the app.

Column Type Notes
id uuid key
team_id uuid references teams
instance_id uuid references instances
name text
set_by uuid optional; references people
set_at timestamptz default now()

Unique (instance_id, name). Check ((name ~ '^[A-Z][A-Z0-9_]*$') AND (length(name) <= 128)).

A folder on a person’s Mac whose Claude Code terminal sessions land in the record. Only the Mac connects or disconnects it, with its machine token. Reconnecting a folder reuses its row.

Column Type Notes
id uuid key
team_id uuid references teams
instance_id uuid references instances
path text
visibility text default 'team'; one of team, private
connected_by uuid optional; references people
connected_at timestamptz default now()
disconnected_at timestamptz optional

Unique (instance_id, path). Check (path ~~ '/%').