You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop App: UI renders massively duplicated content when streaming responses with code blocks #14560
When streaming LLM responses that contain code blocks (code fences, ASCII art, mermaid diagrams), the Desktop App UI renders massively duplicated content. A ~150-line response balloons to 2,300+ lines of visible duplicated text in the message thread.
Environment
App: OpenCode Desktop App v1.2.10 (macOS)
OS: macOS (Apple Silicon)
Model: Claude Opus 4.6 via Amazon Bedrock
Reproduction Steps
Open the OpenCode Desktop App
Send a prompt that generates a response containing multiple code fences, ASCII art, or mermaid diagram blocks
Observe the rendered output in the message thread
Copy-paste the rendered thread content — duplicated content is visible
Expected Behavior
Response renders once, ~150 lines, clean and readable.
Actual Behavior
Content is duplicated dozens of times. Specific metrics from copy-pasting the rendered output:
Expected lines: ~150
Actual lines: 2,385
A single line ("Input: 2") appeared 78 times
Duplication Pattern
The duplication follows a specific pattern tied to streaming inside code blocks:
Line 90: "w = 3 ← mermaid block cuts off mid-token
Line 91: Input: 2 ← entire previous content re-renders from top
...
Line 132: flowchart TD ← mermaid starts again
Line 138: "w = 3 ✓"] ← gets further this time
...
Line 160: │ " ← ASCII box cuts off mid-character
Line 161: Input: 2 ← content re-renders AGAIN from top
Each time a new token arrives inside a code fence, the renderer appears to re-emit all accumulated content rather than appending the new token. Every re-render is captured as additional visible content in the message thread.
Impact
Responses are completely unreadable due to duplicated content
Copy-pasting from the thread gives 15-20x the actual content
Any response with code blocks, ASCII art, or mermaid diagrams triggers this
Likely Root Cause
The streaming markdown renderer re-renders the entire accumulated content block (not just the delta) on each token arrival inside code fences. This re-rendered content is being appended to the visible output instead of replacing the previous render.
Happening to me too, any codeblocks. It cuts off, then rerenders and adds new lines on top of the rerendered code, and sometimes I end up with 10-15 code blocks of basically the same thing. This is happening on ALL models.
Activity
github-actions commentedon Feb 21, 2026
This issue might be a duplicate of (or related to) existing issues. Please check:
If this is a distinct Desktop App-specific bug rather than the same underlying issue, please clarify that in your report.
praxstack commentedon Feb 21, 2026
Possibly related to #10419 (Desktop markdown rendering issue).
SquirrelRat commentedon Feb 21, 2026
Happening to me too, any codeblocks. It cuts off, then rerenders and adds new lines on top of the rerendered code, and sometimes I end up with 10-15 code blocks of basically the same thing. This is happening on ALL models.
Ashesh3 commentedon Feb 22, 2026
Same here,
github-actions commentedon Apr 24, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.