anomalyco / anomalyco/opencode
tui: clipboard-pasted text lands with multi-second delay in question dialog answer field
@simonklee is already working on this.
Since Aug 25, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
When dictating into a question dialog's free-text field (the "type your own answer" option of the multiple-choice question prompt), text inserted via clipboard paste takes several seconds to appear. The same dictation method into the main message composer lands instantly, and manual keyboard typing into the question dialog field is fully responsive — so the delay appears specific to how the question dialog's text input handles pasted input.
Environment
- opencode version: 0.0.0-beta-18138
- OS: macOS (Darwin 25.6.0, arm64)
- Terminal: cmux on the client Mac, connected over SSH to the host running opencode inside a tmux session (
TERM=xterm-256color,COLORTERM=truecolor) - Shell: /bin/zsh
- Install/channel: beta
- Active plugins: none configured
Reproduction
- Run the opencode TUI (v0.0.0-beta-18138) in tmux over SSH.
- Use Handy (voice-to-text) configured with the clipboard paste insertion method — it copies the transcript to the clipboard and simulates a paste keystroke.
- Trigger an agent question dialog (e.g. a tool asking a multiple-choice question) and select the free-text/custom answer option.
- Dictate a response so Handy pastes it into the custom-answer field.
- Compare with dictating into the main message composer.
Expected Behavior
Pasted/dictated text should appear in the question dialog's custom-answer field as promptly as it does in the main message composer.
Actual Behavior
The text appears only after a noticeable fixed lag of roughly a few seconds, regardless of dictated length. Observed behavior:
- Main composer + same Handy clipboard-paste method: instant.
- Question dialog custom-answer field + manual keyboard typing: instant/responsive.
- Question dialog custom-answer field + Handy clipboard-paste: consistent multi-second delay before the text shows up.
No missing or duplicated characters were observed — the text arrives complete once the delay passes. Reproduces consistently.
Additional Context
Since manual typing is fast and the identical paste path is instant in the main composer, the culprit seems to be in the question dialog's input handling of pasted text (e.g. how it consumes bracketed-paste input from the terminal vs. the main editor). Happy to help narrow it down further if useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.