On this page

Tools

Worktrees

The agent edits a separate copy. You apply it or throw it away.

A worktree is a separate copy of the repo. The agent can change that copy while your working files stay as they are.

Start one

In an Agent chat, type /worktree. Tetrarch does the work on the copy and runs the project's checks there.

Bring it back

When it finishes, you get a diff and the check results. Apply to bring the change into your project, or discard to delete the copy.

Prepare the copy

Tell Tetrarch what a fresh copy needs before work starts, such as installing dependencies. You can use a short list of commands or a script the repo already has.

More than one attempt

Ask for the same task more than once and compare the diffs. Keep the one you want and drop the others.