mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why The completed turn profile describes the whole turn. A host measuring latency to an intermediate event needs the elapsed time and critical path at that event. ## What changed Expose `turn_milestones` through `codex-core-api` and bind host-provided watches when a regular turn starts. Add helpers to match published assistant text to the sampled response and capture a one-shot observation with its source, elapsed time, and critical path at the cutoff. ## Testing Add tests that verify a cutoff during a second sampling round includes earlier sampling and joined tool work, stale or cancelled candidates leave the watch available, and elapsed time is recorded even when critical-path capture is disabled. GitOrigin-RevId: 507b7aaf8819b5cedf608ea66807c632bcb59c82