Fill task records' tokens and Codex completion before commit
main·
Commit

Two task.json gaps found by agent-scenarios:
- Claude Code task records never carried token_usage. The record copied the stop payload's usage, and Claude Code's SubagentStop has none. When the payload has no usage, compute it from the subagent's transcript.
- A Codex parent that waits for a child and commits before its own turn ends stored the child's record as still in flight, with no files or tokens. Codex's subagent-stop is provisional and only turn end or session end read the child rollouts. The git post-commit hook now runs the same inventory refresh for Codex sessions with in-flight records before condensation stores them.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M41TFMH7RW7SS7M1VQHZHYQW
Checkpoints
Checkpoint 1