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
Pasting text into the TUI prompt input is silently dropped if the paste arrives while the TUI is still running its startup terminal-capability queries (OSC 4/10/11 palette, XTVERSION, XTGETTCAP, DECRPM, CPR). The paste never appears in the input box, with no error or notification. This makes "paste right after starting opencode" (e.g. an API key, an initial prompt) fail reliably in tmux.
Reproduction (deterministic)
Environment: opencode 1.18.18, Linux VPS over SSH, tmux 3.4, TERM=xterm-256color.
Start a tmux session and launch opencode in a pane.
Within the first ~10 seconds (while the pane is still doing capability queries), run:
tmux set-buffer "hello" && tmux paste-buffer -p
Observe: the text never appears in the input box.
Timing matrix measured with fresh sessions (paste-buffer -p then tmux capture-pane):
paste at
result
t=3s
dropped
t=5s
dropped
t=7s
dropped
t=9s
dropped
t=10s
dropped
t=12s
pasted
t=14s
pasted
Bracketed paste sent from the "outer" terminal through tmux in steady state works fine; only the startup window drops input.
Root cause (from the bundled source in 1.18.18)
During startup the terminal query session (packages/tuiSZ class, detectOSCSupport/queryPalette/querySpecialColors + waitForXtVersion) subscribes to stdin data and consumes everything that arrives while queries are pending:
Any bytes that are not OSC replies (i.e. ordinary typed/pasted input) are read by the query listener and discarded. In tmux, which does not answer the OSC color queries, this window lasts ~10-11s. On a real terminal over SSH it is shorter but still nonzero, and any paste in that window is lost silently.
Expected behavior
Input arriving during startup should be buffered and applied once the TUI is ready (or at least not silently eaten) - the same way the app buffers its own output until the renderer attaches.
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.
Activity
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊