Skip to main content

Worktrees

A worktree is a working copy of one project, kept on one of your organization's nodes. Tasks and console sessions run inside one. The Worktrees page lists every worktree your organization has, called slots, across all its nodes.

Open it from the sidebar: select Directory, then the Worktrees tab.

The worktree pool​

The Worktree pool card: three slots grouped by project, one project opened to its node and its slot

The card's header line shows:

ItemMeaning
Worktree pool and the countsHow many slots there are, how many are not built yet, and how many nodes they're on.
Add slotsOpens the form to add slots. See Add slots.
N shown and its checkboxHow many slots are on screen. The checkbox selects all of them.

By default the list is grouped by project, then by node. Select a bar's ▸ to open it, or its ▾ to close it. The number after a bar's name is how many slots it holds.

Each slot's row shows, from left to right:

ItemMeaning
Round markWho holds the slot. Hover it for the holder.
Number and titleThe slot's number in its project, for example #1, and its title. A free slot is titled free. When a task holds the slot, the title opens that task.
GitHow the tree compares with its base branch. ? means it hasn't been checked yet.
StackUp or Down for the slot's app stack, or None when the project has no stack. ? means no recent report.
SessionWhether a session is running in the slot, for example None.
AgeHow long the current session has run.
CheckboxSelects the slot. See Act on several slots.
⋯The row menu: Details and Select, plus other actions when the slot can take them.

Select a row to open its details.

Filter & view​

Select the menu button at the top right of the page to open Filter & view.

The Filter & view menu: Group by, Node, Project, Occupancy, Session, Stack, Git and Search

SettingWhat it does
Group byProject → node (the default), Node → project, or Flat: one list with no bars.
NodeShows only the slots on the nodes you pick.
ProjectShows only the slots of the projects you pick.
OccupancyFree, Held by a task or Held by a person.
SessionLive: a session is running now. None: nobody is in the slot.
StackUp, Down or Not built.
GitDirty: uncommitted work. Diverged: ahead of or behind its base. Clean.
SearchMatches a title, branch, path, slot number or node name. Every word must match; case is ignored.

To turn every filter off, select Clear in the menu (shown while a filter is on); grouping is kept. When a filter is on, the page title shows how many slots match, for example "2 of 3 slots".

With Group by set to Flat, each row also shows its project and its node:

The flat list: three free slots, each with its project and node

Slot details​

Select a row to open its details panel.

The details panel of a free slot that's not built yet: its status chips, fields, and the Delete slot button

At the top are the slot's name and status chips, for example Declared (added, but the node hasn't built the tree yet), a stack status, and who holds it. Below them:

FieldMeaning
Title, DescriptionWhat the slot is for. A free slot is titled free.
Name, Project, NodeWhich project the slot belongs to and which node it's on.
Branch, GitThe checked-out branch and how it compares with its base.
StackWhether the slot's app stack is running.
Occupancyfree, or the task or person holding it.
Session, Session age, IdleThe session in the slot, how long it has run, and how long it has been idle.
Task, OwnerThe task holding the slot, and its owner.
Model, Account, Config dir, QuotaThe AI model and account the session uses, and its usage quota.
ObservedWhen the node last reported on the slot. never — still a declaration means it hasn't built it yet.
Created, Updated, Created by, Updated byWhen the slot was added and last changed, and by whom.

Under the fields are the actions this slot can take. Which ones appear depends on the slot's state and your role. For a free slot that's not built yet, you see:

  • Change clone owner: picks whose GitHub account the project's copy on this node uses. It applies to every slot of that project on that node. Requires the org admin role.
  • Delete slot: removes the slot and deletes its directory on the node. The panel explains what happens first. This can't be undone. Requires the org admin role.

Add slots​

Select Add slots to open the form. Select Close to hide it.

The Add slots form: Node, Project, Worktrees to add, Slot number and the Add worktrees button

FieldMeaning
NodeThe node the new slots go on.
ProjectThe project they belong to. Add worktrees stays grey until you pick one.
Worktrees to addHow many slots to add. They take the next free numbers.
Slot number (optional)Fill it to add one slot with that number instead. 0 is the project's main clone.

Fill either Worktrees to add or Slot number. Filling one clears the other. Then select Add worktrees.

Act on several slots​

Tick the checkbox of one or more rows, or the one beside N shown to tick them all. A bar appears above the list.

The selection bar: 3 selected, with Sync Git, Stop stack, Release and a ⋯ menu

The bar shows up to three actions as buttons. The rest are in its ⋯ menu.

ActionWhat it does
Sync GitBrings each picked slot up to date with its base branch. Only for slots that are behind and have no uncommitted work.
Stop stackStops each picked slot's running app stack. Its data and the worktree are kept.
ReleaseEnds the hold on each picked slot so it can be handed out again. The worktree and its uncommitted work are kept. The task holding it isn't completed or deleted.
DeleteIn the ⋯ menu. Removes each picked slot and deletes its directory on its node. This can't be undone. Requires the org admin role and the permission to delete worktrees.
✕Clears the selection.

A greyed-out action can't apply to any picked slot. Hover it to see why. Stop stack, Release and Delete ask you to confirm first and name the slots they'll act on. When an action finishes, a line under the bar says how many slots it acted on, and why any slot was refused.