Coincide Get Coincide

Feature

A worktree for every thread

Two agents editing the same checkout will trip over each other. A Git worktree gives a thread its own folder and branch from the same repository, so you can run several agents on one project at the same time and merge what works.

Starting a thread in a new worktree

Under the composer of a new project thread is a strip that says where the thread runs and on which branch. Before you send the first message:

  1. Click the workspace button (it says Current checkout) and choose New Worktree.
  2. Optionally click the branch button (“From main”, say) to pick the branch the worktree starts from. By default it’s the repository’s default branch, or the checked-out branch if there’s no default.
  3. Send your message. The first turn already runs in the worktree.

Coincide creates the worktree right away on a temporary branch such as coincide/1a2b3c4d, then renames the branch after what your first message asks for. Settings › General › “Worktree branch prefix” changes the coincide/ prefix, or removes it.

You can also choose Previous Worktree to put a new thread in the worktree another thread of the project used most recently, or Current Checkout to go back. Once the thread has sent a message, its folder is fixed.

Where worktrees live

Worktrees Coincide creates go in ~/.coincide/worktrees (or a worktrees folder inside COINCIDE_DATA_DIR when that’s set), in a folder named after the repository and branch. The folder is readable only by your Mac user, since it holds checkouts of possibly private repositories. They’re ordinary Git worktrees, so git worktree list in the project shows them.

Working in a worktree

Cleaning up

Coincide removes a worktree it created only when the thread never sent a message, for example when you switch back to the checkout or delete the new thread, and only if the worktree has no changes and its temporary branch has no commits. A worktree that a thread used stays on disk, with its branch, so nothing you or an agent did is lost. Remove it with Git when you’re done:

git worktree list
git worktree remove ~/.coincide/worktrees/<folder>
git branch -d coincide/<branch>   # after merging

Things to know