wisp-agentdiff
v1.0.0
Published
Per-agent diffs for Claude Code parallel subagent workflows
Downloads
133
Maintainers
Readme
wisp-agentdiff
Per-agent diffs for Claude Code parallel subagent workflows.
Claude Code can fan out five subagents in parallel, each in its own git
worktree. When one of them goes rogue, the current workflow gives you one
button: keep everything, or throw everything away. wisp-agentdiff adds
the missing step in between — a tabbed TUI where each subagent's diff,
token usage, and tool-call list lives on its own pane, and one keystroke
approves, reverts, or merges it.
Five subagents refactor the auth module. Four edit cleanly; agent 3 also
rewrites src/db/pool.ts for no good reason. Open the review, press n
to step to agent 3, r to revert it, m to merge the other four. The
pool file never enters the working tree. If two approved agents touched
the same file, the merge refuses and points at the conflict — no silent
merge markers, no theirs/ours guessing.
What it looks like
Install
npx wisp-agentdiff installThat deploys the SKILL and /review-agents slash command into ~/.claude/
and prints a hook snippet. Paste the snippet into ~/.claude/settings.json
once:
{
"hooks": {
"WorktreeCreate": "wisp-agentdiff hook worktree-create",
"WorktreeRemove": "wisp-agentdiff hook worktree-remove"
}
}From then on, every subagent Claude Code spawns with
isolation: worktree in its frontmatter is captured automatically.
Use
After a Claude Code session has run 2+ subagents:
wisp-agentdiff review— or say "review the agents" / "show me what each agent did" in chat
and the skill triggers it for you, or type /review-agents.
Hotkeys
| Key | Action |
|-----|--------|
| a | approve active agent (auto-advances) |
| r | revert active agent (auto-advances) |
| n / p | next / previous agent |
| c | toggle cross-agent conflict view |
| m | merge all approved agents into HEAD |
| j / k | scroll diff |
| q | quit |
Conflict gating
If two approved agents touched the same file, the merge step refuses and
shows you the overlap. You revert one side, then re-press m. The tool
will not write conflict markers, will not pick a winner, and will not
half-merge then abort — either all approved agents land or none do.
How it works
Claude Code subagent ─► WorktreeCreate hook ─► wisp-agentdiff registers agent
│
▼
isolated git worktree
│
Subagent edits + JSONL transcript captured
│
▼
WorktreeRemove hook ─► capture diff, remove worktree
│
▼
wisp-agentdiff review ─► tabbed TUI → [m] merges approvedWe hook into Claude Code's native worktree lifecycle rather than wrapping
git worktree add ourselves, so the integration survives upstream Claude
Code changes and respects .worktreeinclude. Full architecture:
docs/architecture.md.
Why not tazuna / plural / cwt
tazuna, plural, and cwt are worktree orchestrators — they spawn
isolated sessions but stop at isolation and leave the diff to git diff
by hand. Native Claude Code worktrees give you the isolation primitive
but no review surface — cleanup is all-or-nothing.
wisp-agentdiff fills the review step: aggregated TUI, per-agent token
- tool-call telemetry, cross-agent conflict detection, single-key approve / revert / merge.
Status & roadmap
v1.0 ships the core loop. Backlog and open questions live in
docs/roadmap.md. Issues and PRs welcome.
Develop
npm install
npm run check # lint + typecheck + test + build
npm run test:watch # iterating on a single module
npm run dev # tsup watch buildCI matrix: Linux / macOS / Windows × Node 20 + 22.
License
MIT — see LICENSE.
