Task · CAOT-0017

Codex decoder: compaction and context-window lineage

Description

The compacted record carries window_number and the previous window id, so a long session’s context lineage is reconstructable. ContextCompaction items are among the most expensive things that happen, at p50 62s and p95 167s, and are invisible today.

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

Codex compaction records carry typed duration, window id/number, lineage, and gated replacement history; tests passed.

View the source file on GitHub