Skip to content

Dollar sign ($) in AI responses triggers LaTeX/math rendering, breaking TUI output on macOS #15892

@mnunes-net

Description

@mnunes-net

Description

When an AI response contains a dollar sign ($) — such as currency values like $0.02/GB or $203/month — the Mac Desktop app markdown renderer incorrectly interprets it as a LaTeX math delimiter. This causes the text following the $ to be rendered as a math expression and displayed as garbled/exploded character-by-character output in the terminal.

The problem disappears when dollar signs are avoided (e.g., using USD as a prefix instead of $). This confirms the root cause is in how the markdown renderer handles $ as a special character.

Plugins

No response

OpenCode version

v1.2.15

Steps to reproduce

  1. Open OpenCode in the desktop app on macOS.
    . Ask the model a question that will produce currency values in its response. Example prompt:
    "What is the GCP egress rate for Cloud Interconnect in the US?"
  2. Observe the AI response — any currency value like $0.02/GB or $203/month causes the surrounding text to break. The output after the $ renders character-by-character, with HTML tags (e.g., </li>, </strong>) appearing as raw text interspersed with individual characters.

Screenshot and/or share link

Operating System

macOS 26.2 (25C56)

Terminal

MacOS desktop app

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions