Codex App: inline LaTeX using `$...$` does not render in conversations or Markdown preview

Open 💬 7 comments Opened May 19, 2026 by sleepyy-dog

What version of the Codex App are you using?

Observed on Windows with:

  • App package: OpenAI.Codex_26.513.4821.0_x64__2p2nqsd0c76g0
  • Codex App product version shown by the running process: 26.513.40821
  • bundled codex.exe: 0.131.0-alpha.9

What platform is your computer?

Windows x64.

What issue are you seeing?

Inline LaTeX written with single-dollar delimiters does not render in the Codex App UI.

This appears in at least two places:

  1. Assistant conversation output in the Codex App.
  2. Markdown files opened/previewed inside the Codex App.

For example, this remains raw text instead of rendering as inline math:

$x+1=2$

However, the parenthesized LaTeX delimiter does render correctly:

\(x+1=2\)

Display math appears to render correctly in the same environment:

$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$

and:

\[
\int_0^1 x^2\,dx = \frac{1}{3}
\]

Steps to reproduce

  1. Open Codex App.
  2. Ask the assistant to output the following Markdown:
Inline dollar: $x+1=2$
Inline parens: \(x+1=2\)

$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$
  1. Observe that \(x+1=2\) renders as inline math, while $x+1=2$ remains unrendered/raw.
  2. Open or preview a Markdown file in Codex App containing $x+1=2$ and observe the same incompatibility.

Expected behavior

Codex App should either:

  • render $...$ as inline math by default, matching common Markdown math behavior in tools such as ChatGPT, GitHub-flavored math Markdown, Typora, Obsidian, and many documentation workflows; or
  • provide a compatibility setting to enable single-dollar inline math rendering.

Why this matters

Many existing Markdown notes, course materials, technical documents, and generated homework/report files use $...$ for inline math and $$...$$ for display math. Requiring \(...\) only for Codex App compatibility makes these documents less portable and creates friction when working with math-heavy projects.

The current workaround is to write inline math as \(...\), but that requires changing existing Markdown conventions or project instructions even though $...$ is widely used.

Related issues

  • #10715 requested rendered LaTeX support in Codex App and was marked completed.
  • #22821 reports a related but different block-math parsing issue with \[...\] after normal text.

This issue is specifically about single-dollar inline math $...$ not rendering in Codex App conversations and Markdown preview/opened files.

View original on GitHub ↗

7 Comments

yuriever · 3 months ago

I also see this issue in Version 26.513.31313 (2867) on macos.

Incorrect math rendering is a very serious problem for us using codex for mathematics/physics research, and I hope it can be taken seriously.

sleepyy-dog · 3 months ago

@yuriever thanks for your comment bro, the problem should be fixed.Maybe you can sue \(...\) firstly.

DDDOH · 3 months ago

I can also reproduce this on macOS in Codex Desktop.

A minimal Markdown file with both delimiter styles shows a clear compatibility mismatch between Codex and VS Code:

Inline dollar: $\Delta t = t_{next} - t_{now}$

$$
p_\theta(\Delta t_{i+1} \mid h_i)
= \sum_{k=1}^K \pi_k(h_i)\,\mathrm{LogNormal}(\Delta t;\mu_k(h_i),\sigma_k(h_i))
$$

Inline parens: \(\Delta t = t_{next} - t_{now}\)

\[
p_\theta(\Delta t_{i+1} \mid h_i)
= \sum_{k=1}^K \pi_k(h_i)\,\mathrm{LogNormal}(\Delta t;\mu_k(h_i),\sigma_k(h_i))
\]

Observed behavior:

  • Codex Desktop renders \(...\) inline math and \[...\] block math.
  • Codex Desktop renders $$...$$ block math.
  • Codex Desktop does not render $...$ inline math; it remains raw text.
  • VS Code Markdown preview renders $...$ and $$...$$, but does not render \(...\) / \[...\] in the same file.

This makes it hard to keep a single Markdown convention for research/code repos that are read both in Codex and VS Code. Supporting $...$ inline math in Codex would match VS Code/GitHub-style Markdown math and avoid project-specific delimiter workarounds.

Cyfine · 1 month ago

Version 26.715.72359, Released Jul 22, 2026

<img width="516" height="254" alt="Image" src="https://github.com/user-attachments/assets/356dcad8-711d-4ccf-9ad3-273cac4b2fec" />

Inline math: \(E = mc^2\), \(\int_0^1 x^2\,dx = \frac{1}{3}\).

Display math with dollar delimiters:

$$
\frac{d}{dx}\left(e^{x^2}\right) = 2x e^{x^2}
$$

Display math with bracket delimiters:

\[
\sum_{k=1}^{n} k = \frac{n(n+1)}{2}
\]

Inline math with dollar delimiters: $a^2+b^2=c^2$.

Plz add full support for dollar delimiter of math equations, which is the delimiter used by most of the markdown editors/viewers (incl Github).

2667741708 · 1 month ago

Reproduced on a newer Windows build, and the current behavior appears broader than single-dollar inline parsing.

Environment

  • ChatGPT/Codex Windows package: OpenAI.Codex_26.715.7063.0_x64__2p2nqsd0c76g0
  • Platform: Windows x64
  • Date observed: 2026-07-24

Current behavior

In the right-side Markdown file editor/preview, both inline and display formulas remain raw text:

Inline: $E=mc^2$

$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$

Basic Markdown styling such as headings and bold text renders, while the equations do not. The same mathematical content can render in the conversation surface, so the two surfaces are inconsistent.

Additional diagnosis

Inspection of this packaged build shows two different rendering paths:

  • the conversation Markdown renderer can dynamically load remark-math and rehype-katex/KaTeX;
  • the right-side Markdown file editor uses a CodeMirror/Lezer Markdown extension chain for headings, emphasis, links, lists, blockquotes, tables, fenced code, and Mermaid, but that chain has no math parser, KaTeX widget, or math decoration.

This means rewriting the document from \(...\) / \[...\] to $...$ / $$...$$ cannot provide a reliable fix in the current file-preview implementation. The right-side editor needs its own inline/block math parser and a CodeMirror WidgetType/decoration that renders KaTeX, with source fallback while the cursor is inside the formula or if parsing fails.

Suggested regression coverage: inline math, multiline display math, escaped dollar signs/currency, code spans/fences, unmatched delimiters, cursor editing behavior, light/dark themes, and large-file scrolling.

No private project paths or document contents are included in this report.

CubeLander · 1 month ago

I can reproduce a broader variant of this issue on the current macOS Codex App, so I am adding the evidence here instead of opening a duplicate.

Environment

  • Codex App version: 26.715.52143 (5591)
  • Platform: Darwin 25.5.0 arm64 arm (macOS 26.5.2)
  • Surface tested: assistant conversation output

Delimiter matrix

I tested all of the following in a conversation:

````md
Inline dollars: $a^2+b^2=c^2$

$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$

Inline parentheses: \(\displaystyle \frac{\sqrt{x^2+y^2}}{\sum_{i=1}^{n} i}\)

\[
\int_0^1 x^2\,dx = \frac{1}{3}
\]

\operatorname{Throughput}_{\max}
=
\frac{\text{Device Capacity}}{\text{Work per Request}}

````

In this build, none of these forms renders as math in the conversation surface. They remain source text (and the fenced form remains a code block). A simple expression such as \(E=mc^2\) initially looked ambiguous because its raw form resembles ordinary text, but the fraction/root test above confirms that it is not being typeset.

The same $...$ and $$...$$ notation renders correctly in VS Code Markdown preview, which makes a single Markdown convention difficult to use across Codex conversations and research notes.

Why this matters

For mathematics, physics, ML, optimization, HPC, and systems research, equations are part of the primary technical content rather than decorative Markdown. The model can produce valid LaTeX, but the client currently forces users either to read raw source, copy every equation into another renderer, or instruct the model to degrade formulas to Unicode/plain text. That substantially reduces readability during long derivations and makes conversation output less portable to research notes.

At minimum, it would be valuable for the rich-client conversation renderer to support the GitHub/VS Code-compatible $...$ and $$...$$ forms, with \(...\) and \[...\] accepted as aliases if feasible. Copy-as-Markdown should continue preserving the original source. A constrained KaTeX-style renderer with unsafe HTML/URL features disabled would be sufficient for most research workflows.

Please consider treating math rendering as a first-class technical/research workflow requirement rather than only a Markdown styling improvement.

2667741708 · 1 month ago

I implemented and publicly verified an experimental PoC for the right-side Markdown file editor:

https://github.com/2667741708/codex-markdown-math-patch

Tested on Windows package OpenAI.Codex_26.715.7063.0_x64 / desktop bundle 26.715.52143.

The file editor is a separate CodeMirror 6 visual-editing surface; it does not use the conversation Markdown renderer. The PoC adds a CodeMirror replacement widget alongside the existing Mermaid widget and reuses the KaTeX bundle already shipped in the app.

Supported:

  • $...$ and \(...\) inline math
  • standalone/multiline $$...$$ and \[...\] display math
  • clicking a rendered formula restores its original Markdown for editing
  • fenced/inline code, URLs, HTML, escaped dollars, currency, and unmatched delimiters are excluded
  • trust: false; invalid TeX falls back to source

Validation completed:

  • 9 parser tests passed
  • patched ASAR structure and JavaScript syntax verified
  • isolated app copy launched successfully
  • UI test found 4 KaTeX nodes in the sample document
  • clicking $E=mc^2$ reduced the KaTeX count to 3 and exposed the raw source
  • code and escaped-dollar examples remained unrendered

The repository contains no OpenAI binaries and does not modify the signed Store installation. It builds a parallel portable copy and fails closed when the production bundle anchors change.

I could not open a source PR because the public openai/codex repository does not contain the desktop review-file-source-tab frontend source. The repository is intended as a working implementation reference for the desktop team to port upstream.