CLI resume shows raw ::code-comment review directives instead of readable fallback
What version of Codex CLI is running?
codex-cli 0.135.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 25.5.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
Codex doctor report
What issue are you seeing?
When resuming/replaying some sessions in the Codex CLI, review findings are displayed as raw ::code-comment{...} directives instead of a readable Markdown fallback.
This appears related to the existing App / VS Code ::code-comment rendering issues, but the narrower CLI behavior is different:
- Direct
/reviewin the Codex CLI can render review findings as readable text under “Full review comments”. - Some sessions created/opened through Codex App or the VS Code extension can contain raw review directives like:
::code-comment{file="..." start=... end=... priority="P2" title="..." body="..."}
- When such a session is resumed/replayed in the CLI, the TUI assistant markdown path currently surfaces the raw
::code-comment{...}directive text instead of rendering a readable fallback.
Example shape, with private paths/content redacted:
Found two actionable issues.
::code-comment{file="/path/to/file.ts" start=1256 end=1257 priority="P2" title="..." body="..."}
::code-comment{file="/path/to/other.ts" start=77 end=77 priority="P1" title="..." body="..."}
No other discrete issues stood out.
What steps can reproduce the bug?
- Open or create a session through Codex App or the VS Code extension that runs code review and produces
::code-comment{...}review directives. - Resume/replay that session in the Codex CLI.
- Observe that the CLI displays the raw
::code-comment{...}directive text.
I do not think this is the same as the App / VS Code rich-card rendering bug. This issue is specifically about the CLI/TUI replay path lacking a readable fallback for already-recorded ::code-comment{...} directives.
What is the expected behavior?
CLI resume/replay should render code review directives as readable Markdown when rich review-card rendering is unavailable, for example:
- [P2] Title — path/to/file.ts:10-12
Body...
Malformed or empty directives should be preserved verbatim so review information is not lost.
Additional information
I have a focused CLI/TUI fallback branch here:
https://github.com/cuweir/codex/commit/5642fe766b65ffafae8b39ae79b58a48c74797ab
The patch:
- rewrites
::code-comment{...}directives into readable Markdown during TUI assistant markdown parsing - does not change review generation
- does not change stored session data
- does not attempt to fix the App / VS Code rich-card renderer
- preserves malformed and empty directives verbatim
- keeps existing
::git-*directive parsing literal, with a regression test for Windows paths ending in\
Tests cover:
- single-line
::code-comment - multiline body text
- escaped quotes in title/body
- multiple code-comment directives in one message
- malformed/empty directives preserving original text
- existing git directive parsing behavior
Related but broader/different client-rendering issues:
- #23092: Codex App final output does not render
::code-commentblocks. - #22239: VS Code extension renders raw review comments instead of cards.
Would the Codex team be open to an external PR for this CLI-only fallback?