#13854 · @mocksoul · opened Feb 16, 2026 at 2:43 PM UTC · last updated Mar 21, 2026 at 9:14 PM UTC
fix(tui): stop streaming markdown/code after message completes
Score breakdown
Impact
Clarity
Urgency
Ease Of Review
Guidelines
Readiness
Size
Trust
Traction
Summary
This PR aims to fix a TUI bug where the last row of markdown tables is missing. The issue stems from TextPart unconditionally setting streaming to true, preventing opentui from rendering the final row. The PR proposes deriving the streaming state from message completion but explicitly notes that a companion change in opentui is required for a complete fix.
Description
Summary
TextPartpassesstreaming={true}unconditionally — even for completed messages- This causes opentui to always skip the last table row (treated as potentially incomplete)
- Derive streaming state from
message.time.completedso finished messages render all rows
Fixes #13855
Note
Full fix requires companion change in opentui (streaming setter must rebuild tables on true→false transition). See https://github.com/anomalyco/opentui/pull/696
Linked Issues
#13855 fix(tui): last table row missing in markdown rendering
View issueComments
PR comments
mapix-etnc
Adding a +1 from a real-world user — this bug hits every table response when using OPENCODE_EXPERIMENTAL_MARKDOWN=true. The needs:issue label might be blocking — the underlying issue is #13855 (and the original report is #13539).
This PR and #13674 cover the same root fix (streaming derived from message.time.completed instead of hardcoded true). Either one would unblock users. Is there a specific reason neither has been merged yet?
mocksoul
Adding a +1 from a real-world user — this bug hits every table response when using
OPENCODE_EXPERIMENTAL_MARKDOWN=true. Theneeds:issuelabel might be blocking — the underlying issue is #13855 (and the original report is #13539).This PR and #13674 cover the same root fix (
streamingderived frommessage.time.completedinstead of hardcodedtrue). Either one would unblock users. Is there a specific reason neither has been merged yet?
I dunno. Fix in opentui part already merged in main.
trry-hub
Thanks for working on this fix! I was also investigating the same issue (Bug #13855) and started implementing the same solution with createMemo(() => !props.message.time.completed). Great to see you already have a PR for this!
Looking forward to this being merged! 👍
Changed Files
packages/opencode/src/agent/agent.ts
+1−0packages/opencode/src/cli/cmd/run.ts
+5−0packages/opencode/src/cli/cmd/tui/app.tsx
+8−1packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx
+34−4packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
+35−16packages/opencode/src/cli/cmd/tui/context/sync.tsx
+11−0packages/opencode/src/cli/cmd/tui/routes/home.tsx
+1−0packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
+10−3packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
+3−2packages/opencode/src/config/config.ts
+7−1packages/opencode/src/flag/flag.ts
+1−1packages/opencode/src/session/prompt.ts
+1−27packages/opencode/src/tool/registry.ts
+1−1packages/opencode/test/agent/agent.test.ts
+3−3packages/sdk/js/src/v2/gen/types.gen.ts
+8−0packages/web/src/content/docs/cli.mdx
+0−1