codex - 💡(How to fix) Fix Display math block starting with `\[` fails to render when it immediately follows text without a blank line

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

  • The issue is not caused by undefined macros. Simple formulas such as a = b reproduce it.
  • The issue is sensitive to surrounding paragraph structure.
  • Adding a blank line before \[ consistently avoids the bug.
  • When the bug occurs, the content appears to fall back to normal Markdown parsing rather than math parsing.
  • This suggests the block-math parser is not recognizing \[ as a block opener when it immediately follows paragraph text.
  • Previous version of codex does not have this issue.

Code Example

Previous line has text
\[
a
=
b
\]

---

Previous line has text

\[
a
=
b
\]

---

Previous line has text

\[
\boxed{
a
=
b
}
\]
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.513.20950

What subscription do you have?

pro

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

In Codex 26.513.20950, display math written with \[ ... \] sometimes fails to render when it appears immediately after a normal text line with no blank line in between. Instead of being parsed as a math block, the content is treated as regular Markdown/text. In the broken case, the leading backslash on \[ is effectively lost, and the formula body may be reinterpreted by Markdown rules.

What steps can reproduce the bug?

  1. Send the following message:
Previous line has text
\[
a
=
b
\]
  1. Observe that the math block does not render correctly.

  2. Compare with this working version:

Previous line has text

\[
a
=
b
\]
  1. Also compare with this working version, where the formula is preceded by a blank line and wrapped in \boxed:
Previous line has text

\[
\boxed{
a
=
b
}
\]

What is the expected behavior?

A display math block starting with \[ should render correctly regardless of whether the previous line contains plain text, as long as the \[ ... \] block itself is syntactically valid. The renderer should not require an extra blank line before the math block in order to recognize it.

Additional information

  • The issue is not caused by undefined macros. Simple formulas such as a = b reproduce it.
  • The issue is sensitive to surrounding paragraph structure.
  • Adding a blank line before \[ consistently avoids the bug.
  • When the bug occurs, the content appears to fall back to normal Markdown parsing rather than math parsing.
  • This suggests the block-math parser is not recognizing \[ as a block opener when it immediately follows paragraph text.
  • Previous version of codex does not have this issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Display math block starting with `\[` fails to render when it immediately follows text without a blank line