Day 57 of 62 · Tuesday · Learning

Two Claudes at once - git is the refereeCapability

You routinely run more than one Claude at once — today two sessions logged a completed job in the same second. Parallel sessions share one working tree, and git is the only referee keeping them from clobbering each other.

Catch-up progress
57/62
Why this matters to you

This morning's event feed shows two feedback_processed events at the exact same timestamp (13:01:51 — skill-audit and screens-batch). That's two Claudes working concurrently over your files. It's a genuine force multiplier and a real hazard: nothing stops two sessions from editing the same file or both running a broad `git add`, and the loser's work just vanishes.

A Claude Code session doesn't own your files — it edits the one working tree on disk. Two sessions pointed at the same folder are two cooks in one kitchen: if both touch CLAUDE.md, whoever saves last wins and the other's edit is silently gone. Git is what makes this survivable, because every commit is a snapshot you can diff and recover — but only if each change gets committed before the next session overwrites it.

This is the actual reason CLAUDE.md's commit rule splits by repo. In a dedicated project repo (PDB, JobHunt, an app repo) a session commits and pushes as it finishes — small, frequent snapshots are exactly what let parallel work coexist. In the home repo (/Users/tom) the rule is the opposite: always ask first, and stage explicit paths, never `git add -A`. Two reasons stack there — the home tree holds secrets (.claude.json carries tokens) and it's the tree two sessions are most likely to be fighting over, so a blind bulk commit could snapshot half of another session's work plus a credential.

The clean fix, when you genuinely want two sessions running hard, is to stop sharing the tree at all: a git worktree (Thursday's lesson) gives each session its own checkout on its own branch, same history underneath, zero file collisions. Short of that, the discipline is: commit small, commit often, and never let a session run `git add -A` in a tree another session is editing.

Worked example

See exactly what a second session could clobber right now — read-only, safe.

git -C /Users/tom status --short
git -C /Users/tom/Claude/PDB status --short
tail -2 "/Users/tom/Claude/PDB/data/jarbus-events/$(date +%F).jsonl"
▶ Do it now
  1. Run the two `git status --short` commands and read the home-repo output — those are the files where 'ask first, stage explicit paths' is protecting you.
  2. Pick one uncommitted change in a PROJECT repo (PDB) and note it's safe to auto-commit; pick one in the HOME repo and note why it isn't.
  3. State the rule back in one line: which repo does a finishing session commit on its own, and which one does it stop and ask about — and why the home repo is the dangerous one to share.

Gotchas

Go deeper: Claude Code settings & permissions
One-card takeaway

Parallel Claudes share one tree — commit small and often in project repos, ask-first-and-explicit in the home repo, and reach for a worktree when you really want two running at once.