Chat math (KaTeX) renders twice — raw LaTeX/MathML source shown after every rendered formula

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In the chat panel, every rendered math formula is immediately followed by a
duplicate of its raw TeX source, so each equation appears twice (once typeset,
once as plain text). It affects both inline and block math:

  • ( … ), [ … ], and $$ … $$ all render the visual math AND then show
    the raw source right after — e.g. (\eta = 1) shows as “η = 1η = 1”.
  • Single-dollar inline $…$ does not render at all; it shows literally.

The duplicated text looks like the KaTeX MathML / x-tex annotation node, which is
normally hidden by katex.css (the .katex-mathml clip rule). That stylesheet seems
not to be applied in the chat webview, so the accessibility annotation leaks as
visible text. The issue persists after “Reload Window”, quitting/relaunching, and
resetting chat zoom.

Steps to Reproduce

  1. Open the chat/agent panel.
  2. Have a reply contain inline and block math, e.g.:
    • inline: (\eta =1)
    • block: $$\eta = 1$$
  3. Look at the rendered message.

Result: each formula shows the typeset version immediately followed by its raw
TeX source. Single-$ inline math is not rendered at all.

Expected Behavior

Each formula should render exactly once, with no trailing raw-source copy. The
hidden MathML/annotation node should remain visually hidden (as it is in a correct
KaTeX stylesheet).

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Cursor version: 3.6.31
VS Code Extension API: 1.105.1
Commit: 81fcf2931d7687b4ff3f3017858d0c6dee7e2a60
Date: 2026-05-31T17:46:29.630Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.220
OS: Darwin arm64 24.5.0 (macOS 15.5, Apple Silicon)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @ygalklein!

Thanks for the report! A fix should be included in v3.10. In the meantime, since you’re a few versions behind, I’d recommend updating to v3.9.