mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
Resuming a 707 MiB rollout left Codex with a 16.1 GiB physical footprint. The app server rebuilt every turn, the TUI retained another rendered representation, and several resume handoffs cloned the full rollout. Have the TUI request the newest 100 full turns in the resume response. Reconstruct descending pages with a bounded history builder, falling back to full reconstruction when rollback or unmatched lifecycle events make discarded history relevant. Show a notice when older turns were omitted. Move stored rollout history across resume ownership boundaries, omit the redundant SessionConfigured replay clone for app-server resumes, and retain no initial-message transcript in live thread metadata. Preserve restored token usage by attributing it to a turn from the initial page. This bounds retained replay state and avoids full-history clones; loading the rollout file itself remains eager.
codex-protocol
This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex app-server.
This crate should have minimal dependencies.
Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.