An older Codex rollout (no token_usage_record) writes a call's token_count
after the output of the tool that call ran. The call was timed from the
last thing the model was given, which by then was its own tool's output,
so its window was a millisecond or two: on 517 stripped copies of the
owner's Aug/Sep rollouts gpt-5.6-sol's multi-call calls read p50 65,500
and up to 1,844,000 tok/s. A count written seconds after its tool's
output gives the mid-range outliers (sol 972) Fallmonkey reported.
Now a call begins to answer at its first output item (reasoning, a tool
call, an assistant message). It is timed from what the model had last
been given at that moment, and, when its own tool's output came before
its usage line, it ends at its last output item rather than after the
tool ran. Newer rollouts, whose token_usage_record comes before the tool's
output, are timed as before: on 622 stripped recent rollouts every call
reads the same (sol p50 44, max 82). On the older ones sol now reads p50
34, p99 53, max 54. A long output line (a large patch) is read by its
head. The call cache goes to calls-v11 so cached calls are re-read.
TestCallsCodexTimedFromTheAsk is built on a real 2026-09-06 rollout's
shape with content stripped; on the old code it reads [15000 0 0 0]
instead of [15000 29000 8000 9000], and with the long-line branch taken
out it fails too.
Ran: go test ./internal/sessions, gofmt -l, GOOS=linux/windows go vet.