What version of Codex CLI is running?
codex-cli 0.125.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
What issue are you seeing?
Markdown list items that contain block content, especially fenced code blocks, can render without a visual blank separator before the next list item.
The model output includes the blank line in the stored session JSONL, so this appears to be a TUI markdown rendering issue rather than the model omitting the newline.
Given source markdown like:
1. First:
```rust
fn foo() {}
```
2. Second:
Actual TUI rendering is visually closer to:
1. First:
fn foo() {}
2. Second:
Expected TUI rendering:
1. First:
fn foo() {}
2. Second:
What steps can reproduce the bug?
Render a markdown response in the Codex TUI with an ordered list where one item contains a fenced code block and the next item follows after a blank line:
1. First:
```rust
fn foo() {}
```
2. Second:
The source markdown has a blank line between the first item content and the next marker, but the rendered transcript can omit the visual separator.
What is the expected behavior?
The TUI should preserve a readable blank separator before the next list marker when the previous list item contains block content such as a fenced code block.
Simple or tight lists should remain compact:
can still render as:
The goal is not to add extra vertical space to every list item, only to avoid visually attaching the next marker to block-heavy list content.
Additional information
A local fix has been drafted on fork branch:
https://github.com/joshka/codex/tree/joshka/markdown-list-spacing
The draft change tracks when a list item contains block content and preserves a separator before the next marker only in that case. It includes regression coverage for both paths: code-block list items keep the separator, and simple list items stay compact.
What version of Codex CLI is running?
codex-cli 0.125.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
What issue are you seeing?
Markdown list items that contain block content, especially fenced code blocks, can render without a visual blank separator before the next list item.
The model output includes the blank line in the stored session JSONL, so this appears to be a TUI markdown rendering issue rather than the model omitting the newline.
Given source markdown like:
Actual TUI rendering is visually closer to:
Expected TUI rendering:
What steps can reproduce the bug?
Render a markdown response in the Codex TUI with an ordered list where one item contains a fenced code block and the next item follows after a blank line:
The source markdown has a blank line between the first item content and the next marker, but the rendered transcript can omit the visual separator.
What is the expected behavior?
The TUI should preserve a readable blank separator before the next list marker when the previous list item contains block content such as a fenced code block.
Simple or tight lists should remain compact:
can still render as:
The goal is not to add extra vertical space to every list item, only to avoid visually attaching the next marker to block-heavy list content.
Additional information
A local fix has been drafted on fork branch:
https://github.com/joshka/codex/tree/joshka/markdown-list-spacing
The draft change tracks when a list item contains block content and preserves a separator before the next marker only in that case. It includes regression coverage for both paths: code-block list items keep the separator, and simple list items stay compact.