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:70 — OPENCODE_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
Start OpenCode v1.3.0 or later
Ask any question that produces a markdown-formatted response
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
Description
Bug
Markdown in assistant responses is not rendered — headings (
###), bold (**text**), code blocks, and inline code all appear as raw text.Environment
TERM=xterm-256colorWhat works
What doesn't work
OPENCODE_EXPERIMENTAL_MARKDOWN=falsedoes 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:
<markdown>component (default since v1.3.0)<code filetype="markdown">fallbackBoth worked with opentui 0.1.79 in v1.2.0.
Version comparison
Relevant code
packages/opencode/src/flag/flag.ts:70—OPENCODE_EXPERIMENTAL_MARKDOWNchanged fromtruthy()(opt-in) to!falsy()(opt-out)packages/opencode/src/cli/cmd/tui/routes/session/index.tsx— Both<markdown>and<code filetype="markdown">paths affectedPlugins
None
OpenCode version
1.3.13 - 1.3.17
Steps to reproduce
Screenshot and/or share link
No response
Operating System
Windows 11
MacOS
Linux Ubuntu 24.04
Terminal
Git Bash
Zsh
WSL2 Ubuntu