You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chat: LaTeX math ($...$) is not rendered in messages #51725
Math written with LaTeX delimiters ($...$ and $$...$$) is shown literally in chat messages instead of being rendered, so the maths is unreadable.
Environment
opencode version: 2.0.16
OS: Darwin 25.5.0 (macOS, arm64)
Terminal: TERM=xterm-256color; TERM_PROGRAM and COLORTERM unset
Shell: /bin/zsh
Install/channel: latest
Active plugins: none found
Reproduction
Open a chat.
Send or receive a message with inline math, e.g. The distance is $d_i = \sqrt{(x_i-\bar{x})^\top S^{-1}(x_i-\bar{x})}$.
Also try display math delimited by $$ ... $$.
Expected Behavior
The math renders as a formatted equation (or the delimiters are at least not shown as literal text).
Actual Behavior
The $...$ delimiters appear literally and the expression stays unformatted, making it hard to read. The user had to ask the assistant to stop using $...$ entirely.
Additional Context
Hit repeatedly while using opencode for a statistics assignment. Reasonable fixes: add KaTeX/MathJax-style rendering for $...$ and $$...$$, or, failing that, document that math isn't rendered and instruct models to avoid LaTeX delimiters in chat.
Reacted by Mohamed Hafdi Idrissi and StanislavErshov
Activity
github-actions commentedon Sep 27, 2026
This issue might be a duplicate of existing issues. Please check:
$...$and$$...$$are displayed as raw text in the CLI/TUI.neriousy commentedon Oct 1, 2026
Closing as a duplicate of #40508. Same request: render LaTeX in the terminal UI. Tracking in the V2 TUI issue #40508.