Parallel work with worktrees

One checkout can only be on one branch. If Slo is building feature A and you want it to start feature B, you either wait, or you give B its own directory.

A git worktree is that directory: a second (or fifth) checkout of the same repository, each on its own branch, all sharing one .git. It's how you run two or three Slo sessions side by side, and it's the setup most heavy Slo users settle on.

When to reach for one

  • You want two features built at the same time.
  • You want a clean copy of main to read while your branch is half-finished.
  • You want one session writing code and another reviewing it, without either seeing the other's uncommitted edits.
  • You want to try two approaches to the same problem and keep the better one.

1. Create a worktree per piece of work

From your main checkout:

git fetch origin main
git worktree add -b feature/refunds  .worktrees/refunds  origin/main
git worktree add -b feature/invoices .worktrees/invoices origin/main

Add .worktrees/ to .gitignore so the folders don't show up as untracked files.

Or skip the typing and ask Slo. It ships with a worktrees skill:

"Create a worktree for the refunds feature off the latest main."

2. Start one Slo session in each

Each session is scoped to the directory you launch it in:

slo .worktrees/refunds

And in a second terminal:

slo .worktrees/invoices

Each session reads the same SLO.md, AGENTS.md and RESEARCH.md (they're in every checkout) and writes only to its own branch. Session history for both lands in ~/.slo/sessions/, tagged with the directory it ran in.

3. Brief each one separately

Treat them like two engineers. Each gets a full brief with its own outcome and boundaries. Say which directory it owns:

Work only in .worktrees/refunds on branch feature/refunds.
Implement task 12.b from specifications/12-refunds/. Don't commit.

4. Keep track of where you are

With several sessions open, it's easy to lose track. Two quick checks:

  • /cwd shows the directory the current session is scoped to.
  • git worktree list shows every worktree and its branch.

5. Ship and clean up

When a branch is done, ship it from its worktree the usual way (or ask Slo to commit, push and open the pull request). Then remove the directory:

git worktree remove .worktrees/refunds
git branch -d feature/refunds   # once it's merged

Worktrees and dynamic workflows

A dynamic workflow already splits one job across sub-agents. Worktrees split different jobs across sessions. They combine well: run a dynamic workflow in each worktree and watch both with slo visualize.