mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why End-to-end tool duration does not show how much time `exec_command` spends collecting its initial output. Tracking the duration and call count separately lets readers of the metrics compute the mean collection time for each configured shell snapshot mode. ## What changed Record the initial output collection time in whole milliseconds and count each successful process manager response, including collections shorter than a millisecond. The timing starts after the early-exit wait and can include draining output after the process exits. Tag both counters with the configured `shell_snapshot_mode` (`disabled`, `v1`, or `v2`), including when execution falls back. Intercepted patches, process manager errors, and `write_stdin` calls are excluded. ## Testing Extend a unified exec integration test to check that the recorded time matches the initial response within one millisecond, both counters carry the `v2` tag, and a subsequent `write_stdin` leaves the count at one. GitOrigin-RevId: 289336cf2544a78abb3417484b48d2d22109a56c