Snapshot pre-existing untracked files the agent changed in a turn
Commit

Turn-end detection reports an untracked file only when it is new to the turn, and the transcript names no file for a shell command. An agent's shell edit to an untracked file that already existed when the prompt arrived (one it created in an earlier turn, say) therefore never reached the turn's snapshot, and the next prompt's attribution counted those lines as the user's.
Turn end now also snapshots the pre-existing untracked files modified after the pre-prompt capture. The capture time is now recorded with nanoseconds: at second precision a file written in the previous turn within the same second looked modified, which the E2E canary caught as a shadow branch recreated after a mid-turn commit.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M432FVAV81YQT06BSRV6C2A3