mirror of
https://github.com/openai/codex.git
synced 2026-09-03 14:59:03 +00:00
## Why The post-sampling trace calculated an estimated token count even when only the always-on diagnostic and state log sinks were listening, adding unnecessary work after every sample. ## What changed - Move the estimate to a dedicated trace target and calculate it only when that event is enabled. - Disable the target for the always-on diagnostic and state log sinks while keeping it available to explicitly configured subscribers. ## Testing - Verify that the combined always-on subscribers do not enable the estimate event. GitOrigin-RevId: ea572584597dda313e7719897d0ab1fdf7362745