Amble

Workflow · Parallel agents

Two agents, one repository, no shared checkout

Give each agent its own Git worktree: separate working files, separate branch, one repository. It keeps their edits apart. It does not merge them for you, and it is not a sandbox.

Amble ·

Two coding agents in the same checkout is a race. One edits a file while the other is reading it, a test run sees half of each change, and the diff at the end mixes work you wanted to review separately. The fix is older than AI: give each task its own working copy.

In Git that is a worktree. In Amble you create one per workspace, choose the starting commit, and run a different agent in each. This post covers what to split, how to start both, what each working copy needs before an agent touches it, and how to bring the results back together.

What a worktree actually is

A worktree is a second checkout of the same repository. It has its own working files and its own checked-out branch, and it shares the repository's object database. Changes made in one worktree do not appear in another until they are committed and merged.

I checked that property in a scratch repository on November 26, 2026: one commit, two worktrees, one uncommitted edit.

git worktree add ../wt-a -b task-a
git worktree add ../wt-b -b task-b
git worktree list

All three paths sat on the same commit. The edit in the first worktree showed up in git diff there, and the second worktree still read the original file. That is the whole trick: separate working files, one history.

You do not need to type those commands to use the workflow in Amble. They are here because the behavior is easier to trust when you have seen it. A worktree is still not a process sandbox, a permission boundary or a database. Two agents can still compete for the same ports, the same development data and the same provider quota.

Split by independent outcome

Worktrees help when the tasks barely overlap. Three shapes that fit:

Task Starting point Expected result
Implement an import validation fix The agreed baseline commit A small diff and its focused checks
Investigate slow list loading The same baseline, in another worktree A read-only diagnosis and a proposed check before edits
Review the validation fix The implementation's completed branch or supported PR checkout Findings against that change, with no edits unless requested

The third row is where people go wrong. A reviewer that starts from the old baseline cannot see the implementation's uncommitted edits, so it reviews the wrong code. Record the branch and commit under review. And opening a second conversation in the same workspace shares its files, so the separate worktree has to be deliberate.

Create the second checkout in Amble

  1. Open New workspace for the project. In the project's GitHub surface, use Worktrees › New workspace, or the existing new-workspace action. Check the selected project and computer.
  2. Choose a separate working copy. Set Isolation › New worktree. Local reuses the existing directory and is not a second isolated checkout, so do not continue a parallel edit there just because worktree creation was unavailable.
  3. Choose the base deliberately. Use Starting ref to pick the intended ref. Local and origin refs can differ; check which one is selected and inspect its commit. Refreshing a panel is not a remote fetch. A branch choice starts a new branch from that ref; a supported PR selection checks out that change for review.
  4. Check what you got. In the new workspace, read Current branch and the workspace identity, then record the branch name and starting commit. Generated branch names are normal; if your team requires a specific one, use its existing branch workflow before edits.

Do this check before two agents modify files. Each task should open in the intended project on the intended computer, with a distinct worktree and the expected base.

Prepare each working copy before the agent starts

A new worktree is a fresh checkout, not a copy of your comfortable setup. Install dependencies with the project's own lockfile and package manager in each one. Prepare ignored environment files and test data explicitly; installed packages and secrets are not copied from the original checkout.

If the tasks could change the same data, give them separate development databases or other resources. Services need non-conflicting ports and the right backend addresses. A worktree does not isolate shared services, credentials, network access or host processes.

One more thing worth reading before you create anything: worktree creation can run the project's configured setup commands under the host account. Read that configuration first, and inspect the output after creation.

The contract to give each agent

A worktree separates files. It does not tell an agent what to do. Write the task as a contract with a scope, a check and a stopping rule:

Work only on the import validation task in this workspace.
Confirm the selected branch and starting commit before editing.
Preserve unrelated work. Keep changes within the agreed parser and
its tests; ask before expanding scope. Do not switch branches,
merge, publish or edit another worktree. Report changed files,
the exact checks and results, and any remaining uncertainty.

Give an investigator a read-only diagnosis first. Give a reviewer the actual change branch or PR, and ask for findings against its base. A prompt restriction is not a host permission boundary: review tool approvals for each agent, and keep destructive work in a session you are reading.

Collect evidence from each task

Open each workspace separately. Read Changes and confirm the branch, the files and the scope. Base your review on that worktree's diff, not on another agent's summary. Then check the reported results against actual test output, and try the changed behavior with the proper tool. For web work, open that worktree's app and interact with it. A completed turn does not prove the checks passed.

Amble: the agent's inline diff of a hero headline beside the live Harbor Kitchen app preview.
An inspectable change in Amble: the agent's diff beside the running app. In a worktree setup you read that diff in the worktree that produced it, then merge deliberately.

Integrate only after review

Creating worktrees and finishing agent turns do not merge anything. Choose which result to keep, check the target branch and the work already there, then use your repository's normal commit, pull-request and merge workflow. Read the target, the included commits and the confirmation before a merge or any other mutation.

Re-run the checks affected by the combined result and try the real behavior before you call it accepted. When the work is done, use the workspace's archive flow and read the worktree-removal confirmation: check for uncommitted or untracked files you need first. Closing a conversation pane does not stop its work, and archiving does not mean a branch was merged.

Where it breaks, and what to do

Symptom First move
New worktree is missing or creation fails Check that the project is a Git repository on a connected compatible host and that your grant permits workspace creation. Inspect the workspace list before retrying; do not fall back to a shared Local checkout.
The task starts from the wrong code Stop the agent, preserve edits, and inspect the selected ref and commit. A local branch can differ from its upstream.
A test or app works only in the original checkout Check dependencies, ignored configuration, generated inputs, development data and ports in this worktree. Do not copy production secrets or share a mutable database to get a passing run.
Two tasks need the same files or service Reduce concurrency or define ownership and integrate one result first. Separate files do not prevent conflicts in shared data or repository-wide operations.
The host disconnects or a Git result is uncertain Reconnect, inspect the same workspace and its actual status, then decide. Avoid automatic retries that could duplicate a mutation.

Start with two tasks, not five

Pick one implementation task and one read-only investigation from the same commit. Create a worktree for each, prepare dependencies and ports, and give each agent the contract above. Read both diffs before you merge either.

That is the smallest version that teaches you the real costs: a second dependency install, a second set of ports, and a review you cannot skip. Once those are routine, adding a third worktree is an operational decision rather than a leap of faith.

How this was checked

The workflow, labels and limits come from Amble's documentation for parallel agents in Git worktrees, workspaces, files and changes, conversations, and Git tools, read on November 26, 2026. The two-worktree behavior was tested in a scratch repository that day; the commands and the observed result are reported above. The screenshot is a published Amble capture. Nothing here promises a speedup, and no performance number is claimed.

Keep reading

Back to the blog