Repository navigation
How zap decides
zap gives every linked worktree one status.
| Status | Meaning | Removed by default? |
|---|---|---|
merged |
Its work is already in the target branch | Yes |
empty |
It never got a commit of its own | Yes |
missing |
Git still lists it, but its folder is gone | Yes |
gone |
Its branch was deleted on the remote, which often happens when a pull request is merged | Only if you add "gone" to rules
|
idle |
Unmerged and untouched for idle_after
|
Only in the picker, and only if you add "idle"
|
active |
Anything else | Never |
The status tells you where the work is. zap runs the safety checks to decide whether it may remove the folder.
zap measures merges against origin/HEAD, then main, then master, whichever it finds first. To use another branch, pass --target develop or set target in the .zap file.
zap tries each of these in order and stops at the first that passes:
- Fast-forward or merge commit: the branch tip is already in the target.
- Rebase merge: every commit on the branch has an equivalent patch in the target.
- Squash merge: merging the branch into the target would change nothing.
-
Pull request: with
--gh, GitHub reports a merged pull request whose head commit is the branch tip.
zap explain <path> shows each of these checks for one worktree. See Why zap chose that status.
If you merged a pull request on GitHub but haven't pulled, your local main doesn't have the work yet, so zap reports the worktree as active. Either pull first, or add:
-
--fetchto fetch every remote before checking -
--ghto ask GitHub about merged pull requests through theghCLI
zap guesses the AGENT column from the folder:
| Folder | Agent |
|---|---|
.claude/worktrees |
Claude Code |
~/.codex/worktrees |
Codex |
~/.cursor/worktrees |
Cursor |
conductor/workspaces |
Conductor |
.t3/worktrees |
T3 Code |
Anything else shows -. The AGENT label has no effect on the status.
Getting started
Using zap
- The picker
- How zap decides
- Safety checks
- The .zap file
- Scan roots
- Disk alerts
- What agents keep on disk
With coding agents
Reference