Task · CAOT-0015

Codex decoder: rate limits, credits and token rollups

Description

event_msg:token_count carries the full rate-limit block including used_percent, window, reset time, plan type and credit balance. It fires very frequently, so a record per event is waste.

token_usage_record gives three pre-computed rollups: this response, this turn so far, and this thread so far. Diffing cumulative counters by hand is work the transcript already did.

Acceptance Criteria

Definition of Done

Implementation Plan

Wave 1 lane 6: write focused tests first, implement Codex limits/agents/compaction only in the assigned files, and return any shared-helper requirement to root; root integrates and runs the final gate.

Final Summary

Rate limits, credits, sampled token counts, per-response usage, and authoritative rollups are implemented with missing-version findings; tests passed.

References

View the source file on GitHub