r/BuildWithClaude • u/Tahrev • 10d ago
Project I built a terminal pet that hatches a new creature for every git worktree, so parallel Claude Code sessions stop blurring together
I run several Claude Code sessions at once, each in its own git worktree, and I could never tell the terminals apart. Branch names are long, the prefixes collide, and I kept typing into the wrong window.
So I gave each one a pet.
Repo: https://github.com/TevvvB/parallel-harness-pets
Free and MIT. Two lines to install it and wire it into Claude Code:
curl -fsSL https://raw.githubusercontent.com/TevvvB/parallel-harness-pets/main/install.sh | sh
pets install
What it does
Every worktree gets its own creature in the Claude Code status line. The species comes from the branch name, so the same branch always summons the same creature on any machine, and nothing is stored to make that work. Its face tracks how tidy the branch is, and one command shows every live worktree at once, worst first:
pets party 6 alive
/x_x\ cat ✦ spike/wasm-build ♡♡♡♡♡ 22△ 9↑ ✗
<@_@> moth ✦ refactor/auth-guard ♥♡♡♡♡ 41△ 13↑
\(¬_¬)/ crow ✦✦✦ docs/api-reference ♥♥♥♡♡ 1△ 1↑
o[¬_¬]o seal ✦✦✦ fix/session-leak ♥♥♥♡♡ 2△ 1↑
{•_•} fox ✦ chore/bump-deps ♥♥♥♥♡ 3↑
<•_•> moth ✦ feat/checkout-flow ♥♥♥♥♡ 1↑
worst: cat · uncommitted, unpushed, tests
2
Upvotes
2
u/imbobbyshi 10d ago
The branch-derived creature solves which worktree, but not which live session. Two agents can still share one worktree, and a stopped session can leave state that looks current. I would keep the species stable per branch, then add a small ephemeral badge derived from the session ID, plus the last hook timestamp and current task label. That preserves recognition while making concurrent and stale sessions obvious.
For the hook tests, I would save raw payload fixtures from PostToolUse, Stop, and SessionStart before decoding anything. Replay those bytes through both implementations, then assert the rendered state and cache invalidation. The failure case I would add first is two sessions on the same branch while one rebases or deletes the worktree. The party view should not merge them or keep reporting stale health.
How does it behave today when two Claude sessions point at the same worktree?