> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Warm Bazel worktrees for parallel agents

> aspect worktree hands each branch or coding agent a pooled git worktree at a path Bazel has already built in, so it starts warm instead of cold.

[← Shipped](https://aspect.build/shipped)

# Warm Bazel worktrees for parallel agents

***

![Pooled worktree slots, each holding a warm Bazel output base](https://mintlify.s3.us-west-1.amazonaws.com/aspectbuild/images/marketing/illustrations/shipped-aspect-worktree.svg)

Run four coding agents in four git worktrees and you pay for four cold Bazel builds. Bazel keys its server and output base on the workspace path, so every new worktree means a new JVM, loading and analysis from zero, and `external/` fetched again. Delete the worktree and its output base stays on disk.

[`aspect worktree`](https://aspect.build/docs/cli/worktrees) keeps a pool of slots: directories at fixed paths that hold one branch for a while, then another. A new lease lands on a path Bazel has already built in, so it reuses that output base, and the server too if it's still running with the same flags.

```shell theme={null}
aspect worktree add fix/login --create=origin/main
slot=$(aspect worktree path fix/login) && cd "$slot"
bazel test //...
aspect worktree release fix/login
```

Nothing inside the slot has to be an Aspect command. `bazel`, your IDE, and any script in that directory land on the same warm state.

## Built for agents

* **Leases record who took them.** `aspect worktree list` shows each slot's branch, agent, and session, and prints the command that resumes a session whose terminal closed.
* **Uncommitted work stays put.** `release` refuses a dirty checkout and lists what's in it, and an idle slot is only reclaimed when its checkout is clean.
* **One command to clean up.** `aspect worktree release --all` hands back every slot this clone holds.
* **A ready-made skill.** The [agent skill](https://aspect.build/docs/cli/worktrees/agent-skill.md) is text for `AGENTS.md` or `CLAUDE.md` that teaches an agent to take and release slots instead of running `git worktree add`.

It's in the Aspect CLI, free, and marked experimental. [Working in parallel with warm worktrees](https://aspect.build/docs/cli/guides/worktrees.md) walks through a day of it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.