Measure pending subagent files from their observed content
Commit

Review on #2646 found two ways the first version credited user edits to the agent:
- Turn start rescanned running subagents' transcripts from line 0, so an edit already snapshotted became pending again and a later user edit to that file was skipped.
- A commit before the next snapshot used the committed content as the subagent's, so user edits after the subagent finished counted as agent lines.
Pending files now map to a blob of the file's content when the subagent's edit was observed. Turn-start and commit-time attribution measure user edits from that baseline instead of skipping the file or trusting HEAD. Task records keep how far their transcript was scanned; turn start and completion resume there, and turn end advances live subagents past what it snapshotted.
Turn end also snapshots agent files whose user edits the turn's prompt attribution counted. Otherwise an untracked agent file the turn did not touch stays stale in the snapshot and commit-time attribution counts the same user lines a second time.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M41SCDPCT8C59W65V6KP4QGM