CLI resume drops markdown table tail from historical assistant message

Resolved 💬 2 comments Opened Jun 20, 2026 by gfdelarue Closed Jul 14, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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:

```md
| Feature | Example |
|---|---|
| Bold | **important** |
| Inline code |
const x = 1` |
| 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?

  1. 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

`````

  1. Quit the CLI.
  2. Resume the same session with codex resume ....
  3. 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_reflow was enabled
  • No tmux/screen/zellij involved
  • codex doctor --json was run, but full output is omitted here because it contains local paths. Relevant checks: auth/config/app-server OK, update cache reported latest available version 0.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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #27764

Powered by Codex Action

chrisvaillancourt · 2 months ago

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:

  • Resumed a CLI TUI session with codex resume <session-id>.
  • The visible resumed transcript omitted a completed assistant final answer containing markdown tables.
  • The missing message was present in the persisted session JSONL as both an assistant response_item and task_complete.last_agent_message.
  • The resumed/forked session JSONL also contained the final answer before the later user prompt.
  • After prompting continue, the model behaved as though it had the omitted final answer in context and produced an addendum.
  • Resizing the terminal caused the previously missing table/report to appear in visible scrollback.

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