Snapshot the parent's worktree when a droid Worker session ends

Commit

Sophyesterday

Factory AI Droid runs Workers as sessions of their own, recorded at their turn end as a task record on the parent, without a snapshot. Since the busy-window change, the parent's turn end can snapshot first (a human's untracked file differs from HEAD), creating a shadow branch without the Worker's file. The commit's content overlap then found the Worker's new file missing from the shadow tree and nothing condensed into the commit (E2E TestFactoryCommittedCheckpointExcludesPreExistingUntrackedFiles).

The Worker's stop now snapshots for the parent before the record completes, like every other subagent stop.

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

Checkpoints

Fix Claude Code Subagent Attribution Issues

Claude CodeOpus 5.5
View session
Checkpoint 1