Skip to content

Markdown rendering broken since opentui upgrade from 0.1.79 to 0.1.88+ #21299

Description

@ars-ppi

Description

Bug

Markdown in assistant responses is not rendered — headings (###), bold (**text**), code blocks, and inline code all appear as raw text.

Environment

  • Tested on macOS Tahoe 26.4 (Terminal + iTerm2) and WSL2/Windows
  • OpenCode versions tested: v1.3.0, v1.3.13, v1.3.17
  • TERM=xterm-256color

What works

  • OpenCode v1.2.0 (opentui 0.1.79) — markdown renders correctly

What doesn't work

  • OpenCode v1.3.0+ (opentui 0.1.88+) — markdown is raw text
  • Setting OPENCODE_EXPERIMENTAL_MARKDOWN=false does not fix it — the fallback <code filetype="markdown"> path is also broken with opentui 0.1.88+

Root cause analysis

The opentui upgrade from 0.1.79 → 0.1.88 (introduced in v1.3.0 via #18079) appears to have regressed both rendering paths:

  • The new <markdown> component (default since v1.3.0)
  • The old <code filetype="markdown"> fallback

Both worked with opentui 0.1.79 in v1.2.0.

Version comparison

OpenCode opentui Markdown flag default Renders?
v1.2.0 0.1.79 opt-in (false) ✅ Yes
v1.3.0 0.1.88 opt-out (true) ❌ No
v1.3.13 0.1.95 opt-out (true) ❌ No
v1.3.17 0.1.96 opt-out (true) ❌ No

Relevant code

  • packages/opencode/src/flag/flag.ts:70OPENCODE_EXPERIMENTAL_MARKDOWN changed from truthy() (opt-in) to !falsy() (opt-out)
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx — Both <markdown> and <code filetype="markdown"> paths affected
  • Commit that upgraded opentui: 040f551 (Upgrade opentui to 0.1.88 #18079)

Plugins

None

OpenCode version

1.3.13 - 1.3.17

Steps to reproduce

  1. Start OpenCode v1.3.0 or later
  2. Ask any question that produces a markdown-formatted response
  3. Headings, bold, code blocks render as raw plaintext

Screenshot and/or share link

No response

Operating System

Windows 11
MacOS
Linux Ubuntu 24.04

Terminal

Git Bash
Zsh
WSL2 Ubuntu

Activity

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