Machines
What each machine records about itself, what a plan needs, which plans are still alive, how a checkout moves on disk, how a plan moves between machines, and the test devices a task gets.
Each machine that runs plans keeps a short record of itself in the store: its name, its OS, its tools and where its checkouts live. Plans use that record to say what they need, the frontier uses it to skip what this machine cannot run, and a half done plan uses it to travel to a machine that can.
A machine only ever describes itself. Every fact comes from a machine event written by the machine it describes, every heartbeat from a hook that ran there, and a plan moves only through a pack the source machine built and the target machine adopted. No verb infers one machine's state from another's. Without a hub the store holds this machine's events alone, and everything below still works, with no other machine to name.
What a Machine Records
| Fact | Holds |
|---|---|
label | A name for the machine. It defaults to the computer name on macOS and the hostname on Linux. Refusals, run on lists, the frontier and the session brief print it. |
device | The id the hub gave this machine when it enrolled, or - without a hub. |
environment | The T3 Code environment id an agent passed with --environment, or -. The CLI never reads T3's own storage, so this is the only way it learns one. |
os | The platform, then the macOS version or the Linux release name. |
arch | The CPU architecture, such as arm64. |
tool | One line each for xcode, android, docker, bun, node and gh: the version it reported, or absent with the reason. A Docker client whose daemon is not running counts as absent. |
checkout | One line per project: its checkout's path and its origin URL. |
captured | When the facts were taken. |
Each tool check gets 5 seconds. One that times out or fails is recorded as absent with the reason and never fails the refresh.
When It Refreshes
Once plans.db exists, the session start hook reads the facts on every start. When there are none, or they are older than 24 hours, it starts skills machine refresh in the background, at most once a minute, and does not wait for it. Setting SKILLS_MACHINE_REFRESH=0 stops that.
Checkouts are learned where the work happens. The session start hook and skills plans start each record the checkout of the project they detected: the one they run in when its folder carries the project's name, else the main checkout, so a linked worktree with another name records the main one. They write new facts only when the path or origin changed. They also write the checkout's pin, skills.project in its local git config, when the project came from the main checkout's name or the remote rule. skills machine refresh writes no pin. A refresh drops a checkout whose path no longer exists.
The Commands
| Command | What it does |
|---|---|
skills machine show [--json] | Prints this machine's newest facts, one per line, or as one JSON object with --json. It records no facts. |
skills machine refresh [--environment <id>] | Probes the OS, the tools and the checkout it runs in, and records the facts. --environment records the T3 environment id, and a refresh without it keeps the old one. |
skills machine label <name> | Replaces the label. |
$ skills machine show
label Studio Mac
device -
environment -
os darwin 26.1
arch arm64
tool xcode Xcode 26.1
tool android Android Debug Bridge version 1.0.41
tool docker 28.5.1
tool bun 1.3.2
tool node v24.11.0
tool gh gh version 2.83.0 (2025-11-04)
checkout Demo /Users/you/Projects/demo git@github.com:you/demo.git
captured 2026-11-12T09:00:00.000ZWhat a Plan Needs
A plan that only some machines can run says so in a needs: line in its frontmatter, comma separated. A plan with no needs: line runs anywhere.
---
id: 095
slug: ios-share-sheet
needs: macos, xcode
---The words come from one fixed set. skills plans lint refuses any other word with needs: unknown capability "<word>", one of macos, linux, xcode, android, docker, node.
| Capability | Holds when |
|---|---|
macos | The machine runs macOS. |
linux | The machine runs Linux. |
xcode | xcodebuild -version reports a version. |
android | adb --version reports a version. |
docker | The Docker daemon reports a server version. |
node | node --version reports a version. |
This machine meets a plan when every capability holds. Another machine is named in a run on list only when its capabilities hold and its facts also record a checkout of the plan's project, since no plan runs without one. bun and gh are recorded but are not capabilities.
When this machine does not meet a plan:
- The frontier still lists the ready row, with
needs <cap>,<cap>at the end, andskills plans frontier --nextskips it. skills plans starton a TODO plan refuses before it cuts a branch:<id> needs <cap>, this machine lacks it; run on <labels>, naming every other machine that meets it, or ending; no known machine has it./plans waveholds it withheld <id>: needs <cap>, run on <labels>, and/plans do <ctx-slug>leaves it out of the batch withleft <id> needs <cap>, run on <labels>.- A plan with no file on disk whose newest revision has no bytes on this machine counts as unmet too, since its
needs:line cannot be read. The frontier ends its row withneeds unknown, and start, wave and a batch sayneeds unknown, its newest revision has no bytes on this machine. Run it on the machine that wrote the plan. A plan with no revision at all has no needs.
A machine with no facts yet meets no plan that has needs, and the refusal tells you to run skills machine refresh. Nothing starts a thread on another machine for you: paste /plans do <id> into a thread on one of the machines it names.
Heartbeats and Stale Rows
While a plan is DOING, the hooks record a heartbeat on it at most every 5 minutes per session. A DOING row whose newest heartbeat or start is more than 30 minutes old is stale. The frontier ends its DOING entry with (<label>, stale <n> min), and the session brief adds the same to its Plan line. The label is the machine holding the plan's lease, or, without one, the machine that wrote that newest heartbeat or start.
Stale means no heartbeat or start has been recorded for half an hour. An agent working with hooks turned off records none, so a stale row may still be in use. More often the thread has stopped, run out of usage, or be waiting on you. It does not mean the work is lost: the branch and the working tree are where the thread left them.
Moving a Checkout
A checkout's folder can be renamed or moved without losing what this machine knows about it. Move it with the verb instead of mv, from a shell outside the checkout:
skills relocate <from> <to> [--dry-run]An agent runs it only when you ask, since it moves the folder you work in.
What It Carries
The verb renames <from> to <to> in one rename, never a copy, so both must sit on the same volume. Before the rename it pins the checkout to its project, when it resolves to one and no pin answers yet, so it keeps resolving under any new name. After the rename it:
- Records
<to>as the project's checkout in this machine's facts, when they recorded none or recorded<from>. - Runs
git worktree repair, so every linked worktree points at the new place. - Carries the checkout's Claude project folders.
- Renames
<plans>/audit/<old name>/when the folder name changed. - Moves the checkout's entries in
~/.claude.jsonand~/.codex/config.toml.
It also writes the move to <plans>/relocations.tsv, a file local to the machine, so a session recorded at the old path still takes its .env values from the new place and skills audit still finds its sessions.
Claude Code keeps a project's transcripts and its memory in a folder under ~/.claude/projects named for the directory it ran in. With Claude Code 2.1.332, measured on 2026-11-27, the folder was named for the physical path, with symlinks resolved. After a plain move, claude -c at the new path found no conversation and memory was empty, since Claude made a new folder for the new path. With the folder renamed first both came back, and a session in a linked worktree read the main checkout's memory.
So the verb carries those folders. It names a folder the way skills audit picks one, the physical path with every character other than a letter or a digit written as -, and looks at the checkout's own folder and every folder whose name starts with it and a -. It reads the first directory each transcript in a folder records, and renames the folder when all of them are the checkout or a directory inside it, to the name that directory has under <to>. A transcript keeps the path it was written at, so after an earlier relocation it counts each path <plans>/relocations.tsv holds for the checkout as the checkout too. The checkout's own folder goes even when it holds no transcript, as one holding only memory/ does, unless a linked worktree's path gives the same name. A carried transcript keeps its place in the session scan and its chunk numbering, as any renamed Claude folder does. Where the disk ignores letter case, as macOS does by default, a folder named for the checkout in another letter case is the checkout's too.
Claude Code keeps what it knows about a directory in ~/.claude.json, or in .claude.json under CLAUDE_CONFIG_DIR when that is set: each key of projects is a directory holding its trust and its MCP servers, and each array in githubRepoPaths lists the directories that hold a repository. Codex keeps a directory's trust in ~/.codex/config.toml, or in config.toml under CODEX_HOME when that is set, as one [projects."<directory>"] table per directory. Every key, array item and table that is the checkout or a directory inside it, written as the checkout's physical path, the <from> you typed or the path this machine's facts record, moves to its place under <to>; an entry written through another symlink is not recognized and stays. In the Codex config only the quoted path in a table's header changes, in the quote style it was written in, or in double quotes when the new path holds a character single quotes cannot, and a header such as [projects."<directory>".extra] moves with its table. A Codex entry written another way, as a dotted key or in an inline table, is one the edit cannot reach, and the verb refuses. A directory anywhere else in the Codex config, such as a writable root, is no entry: it stays and gets a left line. A moved entry keeps what it holds and where it sits, and every other byte of the file stays as it was. A file that is a symlink is written at its target with its mode kept. Before the rename the verb checks each file and plans the edit, and refuses, with nothing moved, when the file is a dangling symlink, cannot be read, parsed or written, or holds a clash, two entries that would end at one place. It also refuses when the planned text does not parse as the old file with only those entries moved. The edit itself is made after the rename, so a file that breaks in between fails the step and leaves the checkout at <to>: fix the file and run the same command again to move the entries. When the verb sees that Claude Code or Codex wrote the file while it edited it, it reads the file and edits it again, three times at most. A write in the instant between the last check and the rename is not seen and is lost, so quit running Claude Code and Codex sessions before you move a checkout. Permission rules and hooks that name the checkout, in the Claude and Codex settings and in the checkout's own .claude/ settings, are never rewritten: the verb names them in a left line for you to edit.
It prints, in this order:
moved <from> to <to>
recorded <Project> at <to>
repaired <n> worktrees
carried <old folder> to <new folder>
rewrote <file>: <n> entries
left <path>: <why>What It Leaves
A left line names something the verb found and did not change, and never fails the run.
- A Claude folder that also holds transcripts recorded somewhere else, one named for a subdirectory where no transcript records a directory, one holding a transcript the verb cannot read, and one that is a symlink all stay where they are. A folder whose transcripts all record somewhere else is not the checkout's and is passed over without a line.
- An audit folder whose new name is taken stays.
- A file that still names the old path gets a line:
~/.claude.jsonand~/.codex/config.tomloutside the entries it moves, the Claude and Codex settings, hooks and rules files, the checkout's own.claude/settings and its.git/config. The verb only reads them, so edit them yourself. A missing line does not show that no file names the old path.
It never touches Claude Code's prompt history, another tool's own stores, or a symlink elsewhere that points into the checkout.
What It Refuses
Each refusal prints relocate: <reason> on stderr, exits 1 and changes nothing. The verb refuses when:
<from>is not a main checkout, such as a linked worktree or a folder whose.gitis a file or a symlink, or a linked worktree lies inside it or has its old or new folder name.<to>is<from>, lies inside it, sits on another volume, or is taken, unless it is<from>spelled another way, as in a change of letter case.<plans>, the Claude projects directory or a settings file lies inside<from>, or<from>is a skills checkout in use.- A process works in the checkout or one of its worktrees, the sync, scan or facts lock stays held, or the session scan fails, as it usually does on a transcript it cannot read before the Claude folders are looked at.
- A Claude folder cannot be carried: its new name is another folder holding a file, two folders would go to one name, no order of renames frees the names they need, or the Claude projects directory cannot be written. A new name holding only empty folders is removed to make way.
~/.claude.jsonor~/.codex/config.tomlcannot have the checkout's entries moved, for any of the reasons above.
--dry-run makes every check, prints the lines a run would print and changes nothing.
A Failed Run
The rename is the point of no return. When it fails, nothing has moved and the refusal says why. After it, a step that fails prints relocate: <step>: <reason> on stderr, the other steps still run, and the verb exits 1. Run the same command again to finish it: it finds the move in <plans>/relocations.tsv, skips the rename and runs every step again, each of which is safe to repeat. A Claude folder the first run could not carry is carried then.
Moving a Plan
A DOING plan can move to another machine half done, with its commits, its uncommitted changes and its resume note. Neither verb runs unasked, since both change which machine holds the plan. An agent moves a plan only from the Pause safely playbook, and only when you named where it goes.
skills plans move <Project> <id> [--to <label | device id> | --file <path>]
skills plans adopt <Project> <id> [--file <path>]The Pack
skills plans move builds one archive under /tmp/plans-<id>/, never inside the checkout, holding:
pack.json: the project, id, slug and branch, the base ref and its commit, the head commit, the source machine, the time of its newest commit or changed file, a sha256 of the other members, the target, the plan's T3 thread ids and the session ids from its heartbeats.commits.bundle: the branch's commits since its base, left out when there are none.tracked.patch: every uncommitted change to a tracked file.untracked/: every untracked file git does not ignore.resume.md: the resume note at<plans>/<Project>/.resume-<id>.md, which must exist before the move runs.
A pack carries session ids, never transcripts or their paths. Under a transcript policy of off, the thread and session ids are left out too. A pack over 128 MiB refuses, naming the largest untracked file when untracked files are what push it over. A pack cannot carry work that lives in a submodule's own repository, so the move refuses, naming the submodule, when a file inside one is edited or untracked, when one is checked out at a commit the branch does not record, or when the branch's commits or uncommitted changes move its recorded commit.
Through the Hub or a File
With a hub, the pack is uploaded in blobs of up to 1 MiB, each encrypted like every other blob the hub holds. --to names the target by label or device id, and a label two machines share refuses, naming both ids. Without --to, any machine can adopt it.
Without a hub, pass --file <path>. The path must not exist yet and must sit outside the checkout being moved. Copy the file to the other machine yourself. With no hub and neither flag, the move refuses, naming --file.
The move needs the row DOING, a checkout holding its branch, the branch's recorded base and the resume note. It leaves the branch, the working tree and the resume note exactly as they are. Once the upload succeeds, or the pack is written beside the --file path, it records a moved event and releases its lease in one transaction, then puts the file in place. A failed upload records no move, and running the move again sends only the chunks that changed or that the hub lacks. The hub drops the pack once it is adopted, replaced or started again. If the file cannot be put in place after the move is recorded, the refusal says so and names where the pack is. It prints:
moved Demo 095 to Studio Mac, 3 commits, 2 changed files, 1 untracked
/plans do 095A hub move can also print move: the move waits to reach the hub, run skills hub sync on stderr and still exit 0. The pack is uploaded and the move recorded on this machine, but the move could not be confirmed on the hub, so the hub may not have heard of it yet. Run skills hub sync here, on the machine the plan is leaving, before the target adopts. When that sync prints the hub holds other events under this device's sequence numbers, this store was restored or copied from another machine, and the move stays off the hub until the steps of A Restored or Copied Store are done.
While It Is Moving
Until a machine adopts the plan, its DOING row is marked as moving. The frontier ends the row with (moving to <label>), or (moving to any) when no target was named. With a target, skills plans start refuses the plan on every other machine with <id> is moving to <label>. The marker clears when the plan is adopted or started again.
Adopting
On the target machine, run skills plans adopt <Project> <id> after a hub move, or skills plans adopt <Project> <id> --file <path> with the copied file. It works in the checkout this machine's facts record for the project, so run skills machine refresh from that checkout first if skills machine show lists none.
Adopt checks that the row exists here and that the pack is intact. A pack from the hub must match the moved record's sha256 and size. A pack from a file must match the moved record's sha256 when this store holds one, and every member must match the digests in its pack.json. Then it refuses, in this order and before it changes any ref or file:
- Another machine holds the plan's lease.
- The branch already exists.
- The checkout has uncommitted changes, or a merge, rebase or similar operation in progress.
- A resume note is already at
<plans>/<Project>/.resume-<id>.md:<note> already exists, move it aside first. - The base is missing. When the base commit is not here, adopt fetches the base branch from
originand refuses whenoriginlacks it. When the commit is here but no local ororigin/branch names it, the refusal names thegit fetchto run. - Something git does not track sits where the pack would put an untracked file, a changed file or a file its commits add, or a file sits where one of them needs a folder:
<path> already exists in <checkout>, move it aside first.
Otherwise it takes the lease, creates the branch at its base with the base recorded in git config, applies the commits, the uncommitted changes and the untracked files, writes the resume note, sets the row DOING on that branch and records adopted. When a step fails before adopted is recorded, it deletes the branch it created, restores the previous checkout and releases the lease it took, and reports any part it could not undo. A failure after that point leaves the adoption in place and prints adopt: recorded, but <reason>.
adopted Demo 095 into /Users/you/Projects/demo on feat/ios-share-sheet
/plans do 095/plans do <id> then picks the plan up where it stopped: it reads the resume note, skips plans start, and treats the adopted commits and changes as work already done.
To move a plan back to a machine it left, adopt it there like anywhere else. That machine still holds the old branch, any changes left in its working tree and <plans>/<Project>/.resume-<id>.md, so adopt refuses until they are out of the way, and none of them needs deleting: the pack coming back carries everything the first move took and what was done since. Rename the note, say to .resume-<id>.md.old, which the sync still ignores. Commit what is left in the working tree to the old branch, then rename that branch with git branch -m, so the adopt can create it again.
Test Devices
A task that needs a simulator or an emulator asks for one by owner, so the cleanup knows whose it is.
skills device ios|android [--type <type>]
skills reap (<Project> | --mine) [--dry-run]skills device, run from the task's checkout, prints the UDID of a booted iOS simulator, or the emulator-<port> serial of a booted Android emulator. It names the device after the checkout's owner and the device type: plans <Project> <id> <type> while an open plan holds the branch, adhoc <repo> <branch> <type> otherwise. An emulator's AVD name joins the same words with _, after replacing each character of the owner's words other than a letter, a digit, a dot or a hyphen with -. A device with that name is reused as it is, and booted when it is not running, so every call for the same owner and type gets the same one. When there is none it creates one: without --type, a plain iPhone on the newest iOS runtime, or a plain Pixel profile that runs the newest system image. It refuses where skills reap --mine does, below.
skills reap <Project>, which the sweep runs for /plans close with no id and for /plans wave, stops and deletes the test artifacts whose owner is a DONE or DROPPED plan of the project, or an ad hoc branch that handed back and was not cut again since. An owner still at work keeps its artifact with a kept line: a closed plan that has not handed back, or one whose branch an open plan shares. skills reap --mine, which a handback runs from the task's checkout, does the same for that checkout's own owner, even while its row is open, and keeps an artifact another owner sharing its name still holds. With --dry-run it changes nothing and prints what it would reap.
- Simulators, emulators and legacy
plans-<id>-<name>Docker volumes are owned by their name. - Compose projects and listening processes are owned by where they run: a linked checkout on the owner's branch, or
/tmp/plans-<id>/. A compose project goes with its volumes. One running in the primary checkout, or in a checkout on the default branch, is never reaped. - An artifact with no owner is never touched, and neither is the reap itself or a process that started it. A device a
skills devicecall is using at that moment is kept. - A delegate's handback reaps nothing, since its lead is still working.
--mine refuses, touching nothing, on the default branch, on a detached HEAD, in a checkout whose names match two projects, such as a linked worktree whose own folder name gives one and whose pin or main checkout's name gives another, and when it cannot read the default branch of origin.
Each run prints one line per artifact it judged, then the total, where <kind> is simulator, avd, compose, volume or listener:
reaped <kind> <name> <owner>
would reap <kind> <name> <owner>
kept <kind> <name> <owner>: <reason>
skipped <kind>: <reason>
reaped <n> of <m>
would reap <n> of <m>skipped means the tool that lists that kind is missing or cannot be reached, such as a Docker daemon that is not running. A kept line caused by a failure, rather than an owner still at work, makes the reap exit 1.