Measure each session's snapshot claims from its own previous snapshot

main

Commit

Sophyesterday

Sessions in a worktree share the shadow branch, and snapshot claims were measured from the branch tip, which may be another session's snapshot. A file session A shell-wrote was claimed by session B when B's turn ended first; A's own snapshot then saw no change for it (B's snapshot already held A's content) and A lost it.

Sessions now record their last snapshot commit (with its base commit) and measure claims from it. A snapshot whose tree matches the newest one still records the claims and adopts that snapshot as the session's own. When several agents changed a file in one window, each claims it: the lines are agent work either way. Only a session's first snapshot still leaves out files other sessions already claim.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M4637NQA5GA4KVXTTQQ8TRBW

Checkpoints

Fix Claude Code Subagent Attribution Issues

Claude CodeOpus 5.5
View session
Checkpoint 1