Skip to main content
A worktree source cuts a fresh git branch off HEAD (dabs/<id>), checks it out into its own node, and mounts it live — the agent works on an isolated, reviewable copy while your working tree stays untouched.
Screens verified by walkthroughs/test_worktrees.py.

Cut one

From inside a git repo:
(wtbox does the same and boots a shell box over it in one step.)

Judge it at a glance

dabs worktrees ls shows every worktree with a three-value STATE:
The judgment is content, not commit count — landed work never reads as unreviewed.

Point a box at it

--worktree <wt> binds an existing worktree to a recipe’s . source — and also mounts the parent repo’s .git, so git works inside the box and commits reconcile straight into your shared object store (no push):
A plain worktree: . source (wt/wtbox, no flag) cuts a fresh checkout and mounts that same .git alongside it, so git works in that box too. --worktree chooses which checkout the box stands on, not whether it can commit.
After an edit the state flips to has work:
and after an in-box commit, to unmerged:

Working from inside the checkout

A worktree’s checkout lives under dabs’s own storage (~/.dabs/nodes/<id>/held/worktree), and it is a normal place to work from: cd "$(dabs cd <wt>)", then run dabs there. A boot from inside a checkout parents the box on that worktree — and mounts the parent repo’s .git, so git works in-box — exactly as if you had passed --worktree <wt>. An explicit --worktree still wins. That is the one exception to dabs refusing to provision from inside ~/.dabs. What it refuses is marking dabs’s own node store as a new project, worktree, or scratch node; a boot from a checkout never does that — it resolves the owning worktree first and stands on it.

Review, then reap

See exactly what the agent changed — the diff surfaces untracked files too:
rm refuses to discard work nobody reviewed:
Once reviewed (or truly unwanted), --force is the explicit “discard git work” consent — a different risk than the -y prompt, so it is a different flag. Reaping a worktree also takes any box standing on it:

Sweep the clean ones

--clean-worktrees reaps every worktree with no unreviewed work, in one shot — the tidy-up after a day of agent runs:
Add --dry to preview, or --force to include the ones that do hold work.