[macOS desktop] Chat citation-adjacent code/math delimiters swallow subsequent content; same conversation renders correctly on web
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using?
26.901.41600 (build 7982), ChatGPT-branded desktop app, bundle ID com.openai.codex. Installed bundle and running-app log agree on the version.
What platform is your computer?
macOS 26.6 (25G72). This affects a Chat conversation displayed inside the unified desktop app, not a local Markdown file preview or the CLI.
What issue are you seeing?
The same research conversation renders correctly on chatgpt.com (confirmed by the reporter), but the desktop app misinterprets code/math boundaries:
- A large gray code block contains subsequent ordinary prose, literal headings such as
## 11.1 Schema normalization, horizontal-rule markup, and raw LaTeX. - A later opening fence (
```text) is itself displayed literally inside that block. The block finally ends at the later standalone closing fence; the following prose resumes normally. - Below that block, a red math-error region includes raw formula delimiters, an internal citation token, intervening ordinary Chinese prose, and part of the next formula.
A screenshot supplied by the reporter confirms these visual symptoms. It has not been uploaded here; the source patterns below describe the relevant boundaries without publishing the full conversation.
Source pattern / reproduction candidate
Inspection of the saved assistant response found a citation on the same line as an earlier code block's intended closing fence. The following is a reduced source pattern extracted from the affected response, with unrelated intervening sections omitted:
```text
t=231:
subtask = 3
skill = "pick"
stage = "grasp"
instruction = "pick up the red mug"
``` citeturn367462search1
Ordinary prose that should be outside the example.
## 11.1 Schema normalization
首先把不同机器人:
```text
robot A: joint velocity
robot B: joint position
robot C: absolute EEF pose
robot D: relative EEF pose
```
统一。
\[
[x,y,z,r,p,yaw,\text{gripper}].
\] citeturn367462search4
但这并没有真正解决所有 cross-embodiment 问题,因为:
\[
\Delta x=5\text{cm}
\]
The citation strings above are literal internal citation markers in the retrieved response, not ordinary Markdown links. The original response has native citation metadata; pasting these strings into a new user message may not reproduce that path.
Suggested reproduction workflow: render an assistant Chat response with a native citation adjacent to an intended code-block closing fence, followed by headings, another fenced example, and display math with a citation adjacent to its closing delimiter. Compare the same conversation between the desktop Chat renderer and chatgpt.com.
Verification scope: observed in the actual desktop screenshot and checked against the saved response; the reporter verified web renders correctly. This reduced fixture has NOT been independently replayed in the desktop renderer, and we have not established whether streaming versus finalized rendering changes the outcome.
What is the expected behavior?
The desktop and web Chat renderers should handle the same assistant response and its native citation metadata consistently. Citations adjacent to code/math boundaries should not cause unrelated later sections to be displayed as code or fed into the math renderer.
Diagnostic interpretation
A closing backtick fence followed by non-whitespace text is not a valid CommonMark closing fence. Therefore this is not a claim that a generic Markdown parser must accept arbitrary trailing text. The suspected issue is an output-normalization / native-citation handling difference between the two Chat surfaces, or missing recovery for assistant-generated boundary markup. The observed code-block extent matches this hypothesis, but the internal implementation cause has not been proven.
The math blocks in the inspected excerpt have paired delimiters and blank lines before their openers. The red region swallows prose and citation markup despite that. Whether this is a separate math-delimiter issue or a cascade from the earlier fence is unknown.
A local log recorded ResizeObserver loop completed with undelivered notifications about 139 ms after a successful refetch of the affected conversation. This is only a correlation, not evidence that ResizeObserver caused the parsing failure.
Related issues reviewed
- #23436: nested fenced Markdown terminates a content box unexpectedly; does not describe native citations at closing fences or web/desktop parity.
- #22821: display math fails without a preceding blank line; the affected excerpt here has preceding blank lines.
- #37561: Windows Markdown-file preview misrenders formulas/tables; this report concerns a macOS Chat transcript with citation-adjacent boundaries.
No exact duplicate was found in searches for Markdown, LaTeX, code fences, and citations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the macOS desktop Chat renderer and the reduced Markdown fixture described in the issue, comparing its output with chatgpt.com. Check whether native citation metadata adjacent to code or math delimiters changes parsing, including finalized versus streaming responses if relevant. Done means the desktop and web renderers keep prose, headings, citations, code fences, and math boundaries consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, macos, markdown
- Domain
- content, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100