mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
## What changed - Pass session-attributed extension metrics to the Guardian v2 sampler. - Record `codex.guardian_v2.classification.token_usage` histograms for total, input, cached input, cache-write input, non-cached input, output, and reasoning output tokens. - Preserve token accounting when streamed JSON produces an early score by recording usage from the terminal response in the background. ## Testing - Cover token metrics through the Guardian v2 extension and the sampler's early-score path. GitOrigin-RevId: 04fadc07f3b9cbe83f9fa3737536860b5cf5b4be