Skip to content

TUI shows LaTeX math in messages as raw source #53648

Closed as not planned
Closed as not planned

Description

@moritzWa

Description

Models often write math in prose as \( … \), \[ … \] or $$ … $$. The current TUI passes message text straight to the opentui <markdown> component, which has no math support, so the formulas show as raw LaTeX. For example \(0.5^5 \approx 3\%\) instead of 0.5⁵ ≈ 3%, or \text{saved} = (\text{units …}) \times \text{rate}.

#40508 tracks native LaTeX rendering for the v2 TUI. This is about the v1 TUI on dev.

Plugins

None

OpenCode version

1.18.34, and current dev

Steps to reproduce

  1. Ask a model something with a formula, e.g. "what's the chance of 5 heads in a row? write it in LaTeX"
  2. The answer shows \( \frac \approx and so on as plain text

Screenshot and/or share link

raw LaTeX in the TUI

Operating System

macOS

Terminal

Hyper

Activity

  1. opencode-agent commented on Oct 7, 2026

    @opencode-agent
    Contributor

    Thanks for the clear report and the screenshot, @moritzWa!

    This is about the v1 TUI (1.18.34 / dev). v1 only gets fixes for critical bugs, such as data loss, security problems, or crashes and breakage with no workaround. Raw LaTeX in messages is a rendering feature rather than a critical bug, so it's unlikely to be fixed in v1.

    LaTeX rendering for the v2 TUI (@opencode/cli, opencode2) is tracked in #40508, which you already linked. We'd encourage upgrading to v2 and following that issue.

    If you think this is critical, or you see something different on v2 that isn't covered by #40508, please reply here.

  2. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. rekram1-node commented on Oct 7, 2026

    @rekram1-node
    Collaborator

    We aren't going to backport many features to v1 most likely, Im giing to close in favor of the existing latex issue even tho this one is targeted at v1 instead.

    We will do LaTeX soon.

  4. opencode-agent commented on Oct 10, 2026

    @opencode-agent
    Contributor

    Closing as not planned. Raw LaTeX in messages in the v1 TUI (1.18.34 / dev) isn't a critical bug, and v1 only gets critical fixes. We waited a few days in case this turned out to be critical or also happened on v2, and haven't heard back.

    LaTeX rendering for the v2 TUI is tracked in #40508, so please follow that issue. If you see this on v2 in a way #40508 doesn't cover, feel free to open a new issue. Thanks for the report, @moritzWa!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions