Parallel work and Git worktrees
Run child agents side by side, choose writer serialization, and point agents at existing Git worktrees you create.
Child agents can run at the same time in one workspace, and two children editing the same files can overwrite each other. You have two protections: make writers take turns (the Child writers setting), or give concurrent writers separate worktrees or separate files.
Git worktrees are the usual way to get separate checkouts of one repository: each worktree is a directory with its own branch and working files, sharing the same history. Jouzu never creates a worktree for you — you create it with Git, then point a launch at the existing directory.
The Concurrency row in Workflow opens a form showing the current limit. Press Enter there to save a value from 1 to 32, or Esc to discard the edit.
- The default limit is 4 concurrent children.
- The queue holds up to 32 waiting tasks.
- The setting applies to the running session immediately: raising the limit starts queued work without a relaunch.
The value is saved as maxConcurrent in agents.json. Editing that file directly takes effect when a parent session attaches.
The Child writers row chooses what children with write, edit, or shell tools may do to one workspace:
| Mode | Behavior |
|---|---|
| In parallel (default) | Children may write in one workspace at the same time; the workspace lock is not used. Give concurrent writers separate worktrees or separate files. |
| One at a time | Writer roles run one at a time per workspace. Within a parent session, readers also wait for its writer, and separate Jouzu parent sessions serialize child writers through a workspace lock. |
Both rows write agents.json (workspaceWriters: parallel or serialize) and apply to the running session immediately.
From your repository’s main checkout, create a worktree with a new branch. Replace the path and branch names with your own:
- In a terminal, from the repository root, run the command below. Git creates the directory, checks out the new branch, and prints the commit it started from.
- Check that both checkouts are registered.
- Later, after the branch is merged, remove the worktree and delete the branch.
git worktree add ../myproject-feature-x -b feature-xExpected output:
Preparing worktree (new branch 'feature-x')
HEAD is now at 6ad72b5 initialgit worktree list/path/to/myproject 6ad72b5 [main]
/path/to/myproject-feature-x 6ad72b5 [feature-x]git worktree remove ../myproject-feature-xEvery launch has a working directory, which defaults to the parent session’s directory. To work in the worktree, point the launch at the existing directory in either of two ways:
- In the Workflow assignment form, set the Workspace row to the worktree path.
- Ask the main agent to set
workspaceon the launch.
Launch a coder in ../myproject-feature-x. Implement the checkout fix we discussed. Run the focused tests and report changed files, exact check outcomes, and remaining work. Do not merge or push.{"op":"launch","role":"coder","workspace":"../myproject-feature-x","task":"Implement the assigned change and run its focused tests."}| Workspace rule | Detail |
|---|---|
| Path forms | Absolute, relative to the parent session’s directory, or starting with ~. |
| Must exist | Jouzu does not create directories. A launch against a missing, inaccessible, or non-directory path fails with a workspace error naming the path and the reason. |
| Resume | Keeps the directory saved with the run. Changing directories requires a new launch. |
| Not a sandbox | The working directory does not restrict file access; enabled tools can reach other paths your OS permits. |
- Create the worktree:
git worktree add ../myproject-feature-x -b feature-x. - In Jouzu, launch a coder with its Workspace set to
../myproject-feature-x, with one objective and the checks to run. - While it runs, keep working in the main session, or launch a reviewer against the same worktree.
- Read the coder’s report in Runs, verify the checks yourself, and merge from your terminal when you are satisfied.
- Agents and roles — define roles and inspect runs.
- Background jobs — run long commands while agents work.
- Configuration —
agents.jsonand the configuration directory. - Session history — reopen sessions across checkouts.