.bricks/worktrees/, so the agent can build and experiment on a branch without touching your main checkout or any other chat. Merge the work back when you’re happy with it.
Worktrees are only available for projects inside a Git repository. The worktree picker is hidden otherwise.
Pick a working tree
A worktree pill — a branch icon and the current target name — appears in a project chat’s input bar, alongside the other selectors. It shows the working tree the chat runs in, Main by default. You can change the target only while the chat is empty. Once the chat has messages, the working tree is locked: the pill stays visible but no longer opens (its tooltip reads Working tree for this chat (locked once it’s started)). Click the pill to choose between:- Main — your project’s primary checkout
- An existing worktree, listed under the Worktrees heading
- New worktree… — create a fresh one
The worktree picker is per-project. Main Chat has no worktree target.
Create a worktree
Choose New worktree… to open the New Worktree dialog.- Enter an optional Name. As you type, a live preview shows the branch and folder it resolves to:
.bricks/worktrees/<name>. The name is slugified — lowercased, with spaces and other characters collapsed to-, capped at 60 characters. - Leave the name blank to get a generated one such as
brave-otter. - Click Create. CTOR creates the branch and an isolated checkout from your project’s default branch, then runs
bun installin it. The chat switches to the new worktree automatically.
.bricks/worktrees/ to your project’s .gitignore and commits that change, so checked-out worktrees are never committed back into the project.
Work in a worktree
A worktree chat shows a branch icon next to its entry in the sidebar. The agent — and everything the chat does — runs against the worktree’s branch and files, isolated from your main checkout. Because a worktree is meant to be integrated through Merge to main, the publish actions in the chat header’s actions menu are limited:| Action | In a worktree chat |
|---|---|
| Pull | Available |
| Push Config | Hidden |
| Deploy | Hidden |
Merge to main
Open the Worktree dropdown in the chat header and choose Merge to main. CTOR:- Commits the worktree’s pending changes as a snapshot commit.
- Merges the worktree’s branch into the default branch in your main checkout.