CLI TUI does not render Markdown pipe tables

Resolved 💬 0 comments Opened May 10, 2026 by goolen988 Closed May 10, 2026

What version of Codex CLI is running?

codex-cli 0.130.0

What subscription do you have?

Plus

Which model were you using?

GPT 5.5

What platform is your computer?

macOS, Apple Silicon / arm64

What terminal emulator and version are you using (if applicable)?

Ghostty v1.3.1, Build 15212, Commit 332b2aefc

What issue are you seeing?

The Codex CLI TUI renders GitHub-style Markdown pipe tables as raw Markdown
text instead of a readable terminal table.

Example input:

| Field | Value |
|---|---|
| IRS rule | Must be true, current, and compliant |
| Proof | source note / asset manifest |
| Placement | required before generation |

Actual TUI output keeps the raw pipe table syntax.

Expected output should be rendered into a readable terminal-friendly layout,
for example:

Field Value
----- -----
IRS rule Must be true, current, and compliant
Proof source note / asset manifest
Placement required before generation

This matters because Codex often emits structured planning, comparison,
review, and compliance notes in Markdown tables. In the TUI, those become
hard to scan, especially when cells are long.

What steps can reproduce the bug?

  1. Start Codex CLI in the terminal TUI.
  1. Ask Codex to output a GitHub-style Markdown pipe table, for example:

Please output this as a Markdown table:

| Field | Value |
|---|---|
| IRS rule | Must be true, current, and compliant |
| Proof | source note / asset manifest |
| Placement | required before generation |

  1. Observe the assistant response in the Codex CLI TUI.
  1. The table is displayed as raw pipe-table Markdown text instead of being

rendered into a readable terminal table.

What is the expected behavior?

Codex CLI TUI should render GitHub-style Markdown pipe tables into a readable
terminal-friendly table layout instead of showing the raw | ... | Markdown
syntax.

For example, this Markdown:

| Field | Value |
|---|---|
| IRS rule | Must be true, current, and compliant |
| Proof | source note / asset manifest |
| Placement | required before generation |

should be displayed approximately as:

  | Field | Value |
  |---|---|
  | IRS rule | Must be true, current, and compliant |
  | Proof | source note / asset manifest |
  | Placement | required before generation |

For wide tables or cells with long text, it would also be acceptable to fall
back to a vertical key-value layout, similar to:

Record 1

  • Field: IRS rule
  • Value: Must be true, current, and compliant

Record 2

  • Field: Proof
  • Value: source note / asset manifest

Additional information

### Suggested implementation direction
I tested a conservative local patch against rust-v0.130.0:

  • Detect only strict pipe-table blocks where:
  • the header row starts and ends with |
  • the next row is a Markdown divider like |---|---|
  • Render those rows as padded terminal text.
  • Do not globally enable pulldown-cmark table parsing, because that can

broaden parsing behavior and affect surrounding prose.

  • Keep normal Markdown rendering unchanged for non-table content.
  • Add a regression test for pipe table rendering.
  • Update the existing complex Markdown snapshot.

Local validation:
RUST_MIN_STACK=8388608 cargo test -p codex-tui
markdown_render::markdown_render_tests -- --nocapture

Result:
88 passed, 0 failed.

View original on GitHub ↗