Repository navigation
Troubleshooting
Start with zap explain <path> for any worktree that surprises you. It shows every check zap ran.
Your local copy of the target branch probably doesn't have the merge yet. Pull, or run zap scan --fetch. If the pull request was merged on GitHub, --gh asks GitHub directly. See How zap decides.
If your repository merges into something other than main or master, set target in the .zap file or pass --target.
A safety check failed. zap clean --dry-run prints the reason after keep:, and e in the picker shows every check. The usual ones:
| Reason | Fix |
|---|---|
holds ignored .env
|
Move the file out, or remove its pattern from keep_ignored
|
active within min_age
|
Wait, or lower min_age in .zap
|
| a process is working in it | Exit the shell, terminal editor or agent running in it |
| uncommitted changes | Commit, stash or discard them |
| locked | Unlock it with git worktree unlock <path>, or, if the lock is stale, zap clean --unlock-stale
|
The repository isn't opted in. Run zap init there. See Opt a repository in.
It isn't under a scan root. Add its parent folder with zap roots add <folder>. See Scan roots.
gone means the branch was deleted on the remote, which doesn't prove its work was merged. Add "gone" to rules in .zap if you want them removed. A gone worktree with unmerged commits keeps its branch.
zap didn't recognise the folder. This only affects the label. See the folder list in How zap decides.
Either you haven't accepted the disclaimer yet (run zap clean once in a terminal), or the script didn't pass --yes.
You downloaded it with a browser, so macOS quarantined it. Run xattr -d com.apple.quarantine <path-to-zap>, or install with Homebrew.
Run zap undo. See Undo.
If none of these fit, open an issue.
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