Clove Speeds Up Git Worktrees for Coding Agents

Clove git worktrees giving parallel coding agents separate ready-to-run project copies

Clove git worktrees aim to fix a common headache for people who run several coding agents at once: each new checkout starts empty and takes more than a minute to set up. The new tool clones a prepared copy of the project, so a working folder is ready in about a second.

Why one checkout isn’t enough

When several agents share a single checkout, they step on each other. One agent switches branches while another is mid-task, and a login fix ends up on the wrong branch.

Git already offers a way out. The git worktree add command gives every branch its own folder while sharing one repository, so nobody switches branches under anyone else.

The catch is that a fresh worktree has only the tracked files. There are no installed dependencies, no dev shell and none of your local files. Agents then reinstall everything in each worktree or reach back into the main checkout. The next agent repeats the discovery from scratch.

On a monorepo with about 35,000 files, roughly 4,500 npm packages and a nix flake dev shell, that setup took over a minute and gigabytes of disk each time.

The clove terminal UI listing clones with their branch, changes, age and size
Image: clove.fast

How the golden image works

Clove keeps one worktree of the base branch with everything installed and warmed up. Each new worktree is a copy-on-write clone of that image. It shares every block with the original until something changes, and it is registered as a regular git worktree.

On macOS, each clone is an APFS disk image copied whole with a single clonefile call. On Linux, it’s a btrfs snapshot taken in a few milliseconds.

A background service checks the image each time you fetch or pull. If the inputs to a setup step changed on the base branch, it builds the next generation and reruns only those steps. Existing clones keep working untouched.

Clove detects most toolchains on its own, including mise, direnv, nix, pnpm, bun, yarn, npm, uv, Poetry, Bundler, Composer, Go, Gradle, Maven and cargo, plus local files such as .env. Anything else becomes a step in a .clove.toml file that the team can share.

The clove desktop app showing a repository's golden image and clones
Image: clove.fast

Commands built around agents

Clove ships as a CLI, a terminal UI and a desktop app, and each command can print JSON for scripts. Beyond creating clones, it covers the rest of a branch’s life.

  • An update command rebases a clone on the newest base and repeats only the setup steps that changed. When the rebase hits conflicts, an agent sorts them out inside the clone. Claude is the default, and Codex or another command can replace it.
  • A prune command deletes clones once their pull request is merged, including squash merges. Deleted clones sit in a trash for a week, and a restore command brings one back with its uncommitted work.
  • A pull request view shows failing checks, requested changes, unresolved review threads and conflicts next to the agent session that owns each clone.
  • Checkpoints freeze a clone in roughly 0.05 seconds, rewinding takes about 1.5 seconds, and a fork lets two agents attempt different ideas from one starting point.
The clove TUI offering to resolve rebase conflicts with Claude
Image: clove.fast

Teaching agents to use it

A single install command sets up Claude Code, Codex, OpenCode and Pi to work with clones. In managed repos, Claude Code and OpenCode use clones for their own worktrees, while OpenCode and Pi gain tools to create, list and remove them.

Clove also reads local session logs from Claude Code, Codex, pi and Antigravity to show which sessions touched which clone. The developers say nothing leaves your machine.

A suggestion feature looks for chores that agents repeat by hand in fresh clones, such as building workspace packages or generating clients. When the same fix shows up in more than one clone, Clove proposes it as a permanent setup step and shows the evidence.

Every clone gets its own environment variables, including its name and branch and a port offset no other clone uses, so dev servers don’t collide. A process view lists what runs in each clone and stops it before the clone is removed.

Where it fits next

Clove relies on a file system that supports cheap clones, which limits it to macOS and Linux for now. Its own description concedes that other tools cover parts of this job and some do it better. Teams running many agents on large repositories are the obvious audience, since the saved minutes and disk space multiply with every extra clone.

Source: clove.fast

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.