Agent fleets pile up git worktrees. This guide shows how to see every session tree relative to local main, refresh only when it is safe, and reclaim only fully landed clean trees — without force-merging dirty WIP.
TL;DR
| Job | Tool |
|---|---|
| Inventory | pc worktree list / pc worktree insight --json or harness peer/insight.sh |
| UI | Power Claude → Worktree Manager |
| Refresh clean+behind | FF-only peer/refresh.sh (auto after land when configured) |
| Dirty | Finish/commit first — never force-merge |
| Reclaim | reclaim-landed.sh dry-run first; dirty trees always KEEP |
Why worktrees exist
Each coding-agent session can use an isolated checkout under .hurc-harness/worktrees/session-* so agents do not collide on primary main.
What the inventory means
| Field | Meaning |
|---|---|
| behind | Commits on local main that this tree lacks |
| dirty | Uncommitted changes |
| live | Session process appears active |
| landed | Branch content fully on main (reclaim candidate if clean) |
| freshness | current / stale / deferred |
Safe refresh (fail-closed)
| Situation | Action |
|---|---|
| Clean and behind | Fast-forward only |
| Dirty | Deferred — never overwrite WIP |
| Diverged / non-FF | Session merge path; refresh does not force |
Safe reclaim
reclaim-landed.sh (default dry-run): KEEP(landed+dirty) always; only clean fully-landed trees are removed (snapshot-backed).
Power Claude surfaces
- CLI:
pc worktree list·pc worktree insight --json·--stale·--reclaimable - Manager: Command Palette → ⚡ Power Claude: Worktree Manager
Operator FAQ
Does insight change git? No — read-only.
Will refresh touch dirty trees? No.
Can reclaim delete uncommitted work? No — dirty always kept.
Remote/GitHub? Behind is vs local main only. Push is human-owned.
Power Claude by Neural-LLM is independent software — not affiliated with Anthropic, PBC.