Projects & Worktrees
Lattis organizes work around git repositories. A project is a repo; the work inside it is its branches, and each branch an agent works on gets its own worktree — a separate checkout on disk.
Add a project
Section titled “Add a project”In the sidebar, choose Projects → Add project and select a local git repo. It appears in the sidebar with its branches listed beneath it. The repo’s primary checkout is marked with a star (★).
Each project has a settings screen (the gear icon) where you can, among other things, pin it to a specific cloud account.
Branches and worktrees
Section titled “Branches and worktrees”Lattis lists a project’s branches live, straight from git — there’s no separate task state to keep in sync.
- Open an existing branch to launch an agent in its worktree. If a session is already running there, Lattis reattaches to it instead of starting a duplicate.
- Create a new branch with New branch. Lattis creates the branch, adds a dedicated worktree for it (a sibling checkout on disk), and starts your default agent there.
Because each branch lives in its own worktree, several agents can work at the same time with separate working directories, reducing the chance that one agent overwrites another’s files or changes.
Working across branches
Section titled “Working across branches”Switch between branches in the sidebar at any time; running agents keep going in the background, and their stoplights keep you informed even while you’re looking at another branch. Each branch row shows its PR state, line changes, and cost inline, so the sidebar doubles as a status board for the whole project.
Moving a branch into the project folder
Section titled “Moving a branch into the project folder”The project folder (the main worktree) and a linked worktree can trade branches. Use this when a tool must run from the project folder, for example a dev server or an IDE window.
- On a linked worktree, open its context menu and select Promote to Main Worktree.
- On the project folder, open its context menu and select Switch to Worktree…. Then select the worktree whose branch you want.
The two folders stay where they are. The project folder gets the worktree’s branch, and the worktree gets the branch the project folder had. Do the same action again to undo it.
Lattis refuses the swap if either folder has uncommitted changes or a detached
HEAD. The dialog names the folder, its branch, and each changed file. Commit or
stash the changes, then select Check again. Lattis also refuses when a
folder holds an ignored file at a path the other branch commits, for example a
local .env that the other branch tracks. Git would replace that file with
the branch’s copy, and swapping back would delete it. Move the file out of the
folder, then select Check again. Lattis also refuses when the two branches
pin different commits of a submodule that either folder has checked out. The
swap does not update submodules, so each folder would keep the other branch’s
submodule code, and git would refuse the swap back. Commit the same submodule
commit on both branches, or run git submodule deinit for it in both folders,
then select Check again. If submodule.recurse is on, git updates the
submodules itself, and Lattis swaps as usual. Lattis also refuses while a file
from either folder is open in its editor with unsaved changes. The swap closes
those files, so save or close them first. Lattis also refuses while it is still
changing either folder: a pull, a push, or Get latest, a review pass or an
auto-review that is syncing its branch, an Auto Fix, or a Conflicts Auto-fix.
Each would land on the other branch after the swap. Wait for it to finish, or
stop the fix, then select Check again.
If a step of the swap fails and Lattis cannot undo it, the dialog lists the git
commands that put each folder back on its branch. The stopped agents stay
stopped. Run the commands, then open the agents again from the sidebar. On
Windows they run in Command Prompt or PowerShell, unless a branch or folder
name holds %, $, a backtick, a double quote, or a curly double quote
(“, ”, or „): then the dialog says to run them in PowerShell.
If Lattis’s background service does not answer in time, Lattis cannot tell whether the branches were swapped, and the service may still be swapping them. The stopped agents stay stopped, and the dialog offers no Check again. Close the dialog, wait for the sidebar to show each folder’s branch, then open the agents again from there. Until the sidebar shows the branches traded, Lattis holds back work that changes git in both folders: branch actions such as a pull, a push, or Get latest, deleting a branch, removing a worktree, review syncs, review passes, auto-reviews, and fixes. An action started there says a branch swap is running. If the service never ran the swap, the sidebar shows the old branches, and the hold lasts up to 30 minutes. To end it sooner, run the same swap again: its answer replaces the one that never came.
Your work on each branch moves with it. Lattis stops the agents in both folders, because each agent would see the other branch’s files. Then it starts each agent again in the folder its branch moved to, on the same conversation. The pane layout, review progress, and Assist findings move too. Terminal shells close, because a shell has no conversation to resume. If you were on one of the two branches, Lattis opens the branch that moved into the project folder.
Cleaning up
Section titled “Cleaning up”When you’re done with a branch, its context menu offers Delete local branch (removing the worktree), and — once a PR is merged — Lattis can delete the remote branch, local branch, and worktree together as part of the merge. Merging a PR from within Lattis is worktree-aware: it won’t disturb your other checkouts.
Removing a project
Section titled “Removing a project”Settings → Projects lists every tracked project — name, path, worktree count, and whether agents are running — with two actions per row:
- Remove takes the project out of Lattis; every file stays on disk. An Undo appears right where the row was, in case you change your mind.
- Delete… erases the repository and its worktrees from disk. Before you confirm (by typing the project’s name), Lattis inventories exactly what will be deleted — the repository and each linked worktree, with sizes — and warns about uncommitted changes that would be lost and agent sessions that will be stopped.
The same two actions live on each project’s settings screen (the gear icon).
- Running Agents — launch agents in your worktrees.
- Changes & Spend — what each branch is producing and costing.