CLI resume drops markdown table tail from historical assistant message
What issue are you seeing?
When resuming a Codex CLI session, a historical assistant message that contained a markdown table was rendered only up to the plain fenced code block immediately before the table. The table and following task-list lines were present in the persisted session data, but they were not visible in the resumed CLI transcript/scrollback.
Observed visible CLI output shape:
````md
This is a plain fenced code block with no language specified.
It may not get syntax highlighting.
````
Then the next user turn appeared immediately. The following table and task-list lines were missing from the visible resumed CLI output:
```mdconst x = 1` |
| Feature | Example |
|---|---|
| Bold | **important** |
| Inline code |
| Link | OpenAI |
- [x] Checked task
- [ ] Unchecked task
````
I verified this was not session-data loss: the persisted assistant response still contained the table/task-list block, and codex app-server --stdio thread/resume returned the same assistant item with the table/task-list text intact. This points to the TUI resume/replay/rendering path rather than persistence corruption.
What steps can reproduce the bug?
- In Codex CLI, create a session where an assistant response includes a plain fenced code block followed immediately by a GitHub-style markdown table, followed by task-list markdown. Example content:
````md`
``
This is a plain fenced code block with no language specified.
It may not get syntax highlighting.
| Feature | Example |
|---|---|
| Bold | important |
| Inline code | const x = 1 |
| Link | OpenAI |
- [x] Checked task
- [ ] Unchecked task
`````
- Quit the CLI.
- Resume the same session with
codex resume .... - Inspect the visible resumed transcript/scrollback.
What is the expected behavior?
The resumed CLI transcript should render the full finalized assistant message from the persisted source, including the markdown table and the following task-list lines.
It is fine if task-list checkboxes render as literal - [x] / - [ ]; the main issue is that the table tail and following lines should not disappear.
Additional information
Sanitized environment details:
- Codex CLI:
codex-cli 0.136.0 - Platform: Linux x86_64 / NixOS
- Terminal family reported by
codex doctor: VTE terminal_resize_reflowwas enabled- No tmux/screen/zellij involved
codex doctor --jsonwas run, but full output is omitted here because it contains local paths. Relevant checks: auth/config/app-server OK, update cache reported latest available version0.141.0.
I noticed 0.141.0 has changes in the resize/reflow and stream-consolidation area, so this may already be fixed by recent work. I was not able to get a clean latest-version TUI capture to confirm either way.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce a very similar issue on Codex CLI
0.142.0, with one extra clue: resizing the terminal makes the missing historical assistant message appear.Observed behavior:
codex resume <session-id>.response_itemandtask_complete.last_agent_message.continue, the model behaved as though it had the omitted final answer in context and produced an addendum.That makes this look like initial resume replay / history insertion fails to render the full completed message, while resize reflow rebuilds from the correct transcript cells.
Here's a screen recording showing the missing content appearing after terminal resize: https://github.com/user-attachments/assets/f3e30431-d6da-4153-b866-233c47f59f16