Parallel work and Git worktrees

Run child agents side by side, choose writer serialization, and point agents at existing Git worktrees you create.

Why separate workspaces

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.

Set the concurrency limit

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.

Child writers: in parallel or one at a time

The Child writers row chooses what children with write, edit, or shell tools may do to one workspace:

ModeBehavior
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 timeWriter 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.

Create a worktree yourself

From your repository’s main checkout, create a worktree with a new branch. Replace the path and branch names with your own:

  1. 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.
  2. Check that both checkouts are registered.
  3. Later, after the branch is merged, remove the worktree and delete the branch.
Terminal
git worktree add ../myproject-feature-x -b feature-x

Expected output:

Output
Preparing worktree (new branch 'feature-x')
HEAD is now at 6ad72b5 initial
Terminal
git worktree list
Output
/path/to/myproject           6ad72b5 [main]
/path/to/myproject-feature-x 6ad72b5 [feature-x]
Terminal
git worktree remove ../myproject-feature-x

Launch an agent in an existing worktree

Every 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 workspace on the launch.
Prompt
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.
JSON
{"op":"launch","role":"coder","workspace":"../myproject-feature-x","task":"Implement the assigned change and run its focused tests."}
Workspace ruleDetail
Path formsAbsolute, relative to the parent session’s directory, or starting with ~.
Must existJouzu 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.
ResumeKeeps the directory saved with the run. Changing directories requires a new launch.
Not a sandboxThe working directory does not restrict file access; enabled tools can reach other paths your OS permits.

A two-agent flow

  1. Create the worktree: git worktree add ../myproject-feature-x -b feature-x.
  2. In Jouzu, launch a coder with its Workspace set to ../myproject-feature-x, with one objective and the checks to run.
  3. While it runs, keep working in the main session, or launch a reviewer against the same worktree.
  4. Read the coder’s report in Runs, verify the checks yourself, and merge from your terminal when you are satisfied.

What next?