[CLI/TUI] Resume renders the full thread history instead of bootstrapping the latest turn
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start in codex-rs/tui/src/app_server_session.rs at thread_resume_params_from_config, then read the app-server README sections for excludeTurns and initialTurnsPage. Trace the resume request and add a TUI regression test asserting that bootstrap history contains only the latest completed turn while the rollout remains unchanged and full context is preserved.
Written by the indexing model from the issue text.
Description
What version of Codex CLI is running?
Reproduced on codex-cli 0.145.0 (also observed on 0.144.6).
What subscription do you have?
ChatGPT subscription (exact tier not disclosed).
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Windows 11 Professional, build 10.0.26200, x64.
What terminal emulator and version are you using?
Windows Terminal 1.24.11911.0, PowerShell, no terminal multiplexer.
Codex doctor report
Fresh codex doctor --json result, summarized to exclude local paths, user
names, thread identifiers, and private configuration details:
- standalone Windows installation;
- CLI
0.145.0; - Windows Terminal detected;
- config load and rollout/database parity both healthy;
- overall status
okand current version not older than the latest release.
What issue are you seeing?
Resuming a long Codex CLI thread in the TUI visibly rebuilds the entire previous
conversation before reaching the prompt. Multi-day sessions therefore spend
noticeable time replaying old turns and produce a long scrolling sequence, even
though only the most recent completed turn is needed for the initial human-facing
view.
The desired behavior is display truncation, not history deletion: keep the full
rollout and full model continuity, but show only the latest completed
user/assistant turn in the TUI. The terminal does not need an older-history
expansion interface; if prior context matters, the user can ask Codex directly.
What steps can reproduce the bug?
-
Create or use a Codex CLI thread with several large turns over multiple days.
-
Close the TUI normally.
-
In Windows Terminal, run
codex resume <thread-id>. -
Observe that the TUI renders/replays the historical turns before settling at
the current prompt. -
Compare the app-server resume paths for the same stored thread:
- default
thread/resumereturns the fullthread.turnspayload; thread/resumewithexcludeTurns: trueand
initialTurnsPage: {limit: 1, sortDirection: "desc", itemsView: "full"}
returns only the newest turn page for a legacy thread.
- default
Private thread identifiers and transcript contents are intentionally omitted.
What is the expected behavior?
On resume, the TUI should become interactive after rendering only the latest
completed turn. Older turns should not be rendered in the terminal. The complete
conversation should remain stored and remain available to Codex as model context,
so the user can ask Codex for earlier context when needed. Resuming must not
truncate, compact, rewrite, or replace the rollout.
Additional information
One legacy rollout was 6,046,582 bytes and contained eight reconstructed turns.
Elapsed time is from one local trial and is not intended as a stable performance
claim.
| CLI | Resume path | Time | Response bytes | Returned turns |
|---|---|---|---|---|
0.144.6 |
Default full resume | 1.176 s | 509,897 | 8 |
0.144.6 |
One-turn page | 0.931 s | 29,672 | 1 |
0.145.0 |
Default full resume | 1.860 s | 510,100 | 8 |
0.145.0 |
One-turn page | 0.174 s | 29,875 | 1 |
On 0.145.0, the one-turn request reduced response data by about 94.1% and
elapsed time by about 90.6% in this single trial. The rollout SHA-256, file
size, and modification time were identical before the upgrade and after both
requests. The active session count also remained unchanged.
The app-server already documents excludeTurns, initialTurnsPage, and cursor
pagination:
https://github.com/openai/codex/blob/main/codex-rs/app-server/README.md
At the rust-v0.145.0 release commit, the TUI's
thread_resume_params_from_config constructs ThreadResumeParams and finishes
with ..ThreadResumeParams::default(). That leaves exclude_turns = false and
initial_turns_page = None, so the terminal client requests the full legacy
history:
Suggested acceptance criteria
- Resume a large legacy thread without rendering every historical turn first.
- Show the latest completed user/assistant turn at bootstrap.
- Do not add an older-history expansion requirement to the terminal view.
- Preserve the original rollout byte-for-byte during a display-only resume.
- Preserve the full model-visible thread context.
- Let the user recover earlier context by asking Codex naturally.
- Add a TUI regression test asserting one-turn bootstrap history.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·