This is the end-to-end shape the rest of the docs assume: one large repo, several agents working on it at once — each in its own clone, on its own branch — and one person reviewing and merging what comes back.
The shape of it#
Five lines, before any commands:
- A branch is a task — one unit of work, usually one agent session.
- Each task gets its own clone. A shallow clone downloads only the newest commit, and
--fromreuses content another checkout on the same machine already has, so N tasks don't mean N full downloads. - Commits are checkpoints; the branch description is the message.
- Publishing isn't merging. Each agent pushes its branch and stops. Nothing reaches
mainuntil a person merges it. - Merging squashes.
maingets one commit per task, however many checkpoints the agent made.
If you're coming from Git: a clone per task does what worktrees do; the branch description does what a PR title and body do, minus the PR; and the squash merge is what "Squash and merge" does, except it's the only merge there is.
1. Set up#
curl -fsSL https://oak.space/install | sh
oak login
oak repo list --org acme # which repos can you clone?
# acme/monorepo
# acme/infra
# acme/docs
mkdir acme && cd acme # any directory works
2. Fan out#
One task = one directory = one clone = one branch. Tasks are isolated by construction: separate directories, separate working trees, separate branches, and none of them can touch main.
oak clone acme/monorepo ./fix-auth-redirect --shallow
oak clone acme/monorepo ./add-search-index --shallow --from ./fix-auth-redirect
oak clone acme/monorepo ./bump-tokio --shallow --from ./fix-auth-redirect
--shallow leaves out the history, and --from copies file content from the first clone instead of downloading it again. If a task only needs part of the monorepo, add --path to make a sparse clone of just those directories.
Now launch one agent per task. Each starts its own branch with oak start, so the branch name reads as the work. With Claude Code:
claude -p "Work in ./fix-auth-redirect. Start with: oak start 'fix auth redirect'.
The OAuth callback drops the ?next= param. Fix it, then finalize with oak finish." &
claude -p "Work in ./add-search-index. Start with: oak start 'add search index'.
Add a trigram index behind the search-index flag. Finalize with oak finish." &
claude -p "Work in ./bump-tokio. Start with: oak start 'bump tokio'.
Bump tokio to 1.42 across the workspace and fix the fallout. Finalize with oak finish." &
wait
A cross-repo task gets one clone per repo — clone acme/monorepo and acme/infra side by side under ./unify-errors/ and start the same task name in each.
3. Each agent finishes its own branch#
Each agent ends with:
cd ./fix-auth-redirect
oak finish --desc-file /tmp/desc.md --json
One command that checks it can publish, sets the branch description from the file, checkpoints anything uncommitted, and pushes. If a step fails, nothing is lost and the JSON names the next command.
Pushed branches appear live on the repo's Branches page, and oak branch triage --remote lists them from anywhere.
4. Review what came back#
Three branches, and you don't want to switch your working tree three times. Start with triage:
oak branch triage --remote # every open branch, scored
oak branch triage --remote --only mergeable
oak branch triage --remote --only ambiguous
Then read the ones that need you:
oak diff fix-auth-redirect # full-screen, no checkout
oak branch diff add-search-index --diff-mode net-merge
Or do it in the browser: the Branches page lists every open branch, and each one opens to its diff with a Merge button. Reviewing branches has the details.
5. Land them#
Merging is a decision, so it happens from somewhere you control — the web UI or your own checkout:
# In a clone of the repo (a shallow or sparse one is fine)
oak switch fix-auth-redirect
oak merge # squash onto main
Or check off the clean branches on the Branches page and click Merge selected.
When a branch conflicts, don't re-run the agent from scratch — go back to the task's clone, still on that branch, and fix it in place:
cd ./fix-auth-redirect
oak pull # merge the new main in; conflicts surface here
# resolve, or hand this clone to an agent
oak pull --continue
oak commit && oak push
If the clone is gone, make a new one with oak clone acme/monorepo --shallow and oak switch fix-auth-redirect. That's also how a follow-up prompt keeps working on a branch an agent already pushed.
6. Clean up#
A task's clone is an ordinary directory. Once its branch is merged or closed, check nothing is left unpushed and delete it:
cd ./bump-tokio && oak agent state --json --compact # dirty and unpushed work, if any
cd .. && rm -rf ./bump-tokio
All of it at once#
# once per machine
curl -fsSL https://oak.space/install | sh && oak login
# fan out
oak clone acme/monorepo ./fix-auth-redirect --shallow
oak clone acme/monorepo ./add-search-index --shallow --from ./fix-auth-redirect
claude -p "Work in ./fix-auth-redirect. Start with: oak start 'fix auth redirect' …" &
claude -p "Work in ./add-search-index. Start with: oak start 'add search index' …" &
wait
# review, checkout-free
oak branch triage --remote --json
oak diff <branch>
# land
oak switch <branch> && oak merge # or Merge in the web UI
# delete clones whose branches have landed
rm -rf ./fix-auth-redirect ./add-search-index
Scaling up is more of the same: more task directories, more clones, more agents. The limit worth knowing is your own review throughput, which is what oak branch triage exists to protect.