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 crash: pasting ~270KB text into prompt hangs renderer (JSON.stringify on main thread) #51988
opencode Desktop hangs ("renderer unresponsive", then crash) when pasting a large text (~277 KB, ~1500 lines) into the chat prompt input in one go.
Environment
App: opencode Desktop 1.18.31 (packaged, win x64)
OS: Windows x64
Reporter: via Meta Muse Spark agent session
Repro
Open opencode Desktop, start a session.
Copy ~277 KB of plain text (in my case: 1503 lines / 276,765 bytes of Docker pull JSON progress log) and paste it into the prompt input at once.
The renderer hangs almost immediately ("renderer unresponsive"), and the app has to be killed / crashes.
Evidence (from exported debug logs)
desktop/.../window.log captured the hang with stack samples, all inside the paste path:
[error] (window) renderer unresponsive { window: '...', currentURL: 'oc://renderer/index.html' }
...
at HTMLDivElement.onPaste (main-mfFBJ4oT.js:129605:66)
at HTMLDocument.eventHandler ...
at PromptInputV2._el$6.$$input ...
at Object.onInput ...
at Object.setPrompt ...
at JSON.stringify (<anonymous>)
So each onInput from the paste runs setPrompt → synchronous JSON.stringify of the prompt/editor state on the renderer main thread. With ~270 KB of pasted text this blocks the main thread long enough for the renderer to be flagged unresponsive and die. No minidump is produced (Crashpad dir empty) — consistent with a main-thread hang rather than a native crash. renderer.log shows only unrelated ResizeObserver noise.
Expected
Large pastes should not kill the app — e.g. debounce/coalesce input handling, move prompt serialization off the critical path (or off the main thread), and/or cap single-paste size with a graceful warning.
Activity
github-actions commentedon Sep 29, 2026
This issue might be a duplicate of existing issues. Please check:
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊