CLI input issues on WSL Ubuntu: no multiline input and copy/paste not working #4412

Open
opened 2026-02-16 17:43:42 -05:00 by yindo · 3 comments
Owner

Originally created by @Coffe2Cat on GitHub (Jan 8, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

Environment

  • OS: Windows 10 / 11
  • WSL: Ubuntu (WSL2)
  • Terminal:
    • Windows Terminal (default profile)
  • OpenCode version: 1.1.4

I installed OpenCode inside WSL Ubuntu, and I’m experiencing some usability issues in the CLI input:

Multiline input is not possible

Pressing Enter, Shift + Enter, or Ctrl + Enter immediately submits the prompt

There is no way to insert a newline while typing

Copy & paste does not work inside the CLI

Right-click paste does nothing

Standard terminal paste shortcuts do not work reliably inside the OpenCode prompt

This makes it very difficult to provide longer prompts or code snippets

Originally created by @Coffe2Cat on GitHub (Jan 8, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question ### Environment - OS: Windows 10 / 11 - WSL: Ubuntu (WSL2) - Terminal: - Windows Terminal (default profile) - OpenCode version: 1.1.4 I installed OpenCode inside WSL Ubuntu, and I’m experiencing some usability issues in the CLI input: Multiline input is not possible Pressing Enter, Shift + Enter, or Ctrl + Enter immediately submits the prompt There is no way to insert a newline while typing Copy & paste does not work inside the CLI Right-click paste does nothing Standard terminal paste shortcuts do not work reliably inside the OpenCode prompt This makes it very difficult to provide longer prompts or code snippets
yindo added the windowsopentui labels 2026-02-16 17:43:42 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4046: Shift-return does not input newline since 1.0
  • #7248: unable to insert new line in prompt box in MacOS Tahoe basic Terminal
  • #7075: Cannot input multiple lines in VSCode or AntiGravity
  • #7210: TUI - single-line paste moves cursor to the end of input
  • #3941: Terminal in JetBrains IDE doesn't work properly (can't type or paste multiline commands)
  • #5168: Mouse Input Spam / SIGPWR Signal Storm in WSL2

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 8, 2026): This issue might be a duplicate of existing issues. Please check: - #4046: Shift-return does not input newline since 1.0 - #7248: unable to insert new line in prompt box in MacOS Tahoe basic Terminal - #7075: Cannot input multiple lines in VSCode or AntiGravity - #7210: TUI - single-line paste moves cursor to the end of input - #3941: Terminal in JetBrains IDE doesn't work properly (can't type or paste multiline commands) - #5168: Mouse Input Spam / SIGPWR Signal Storm in WSL2 Feel free to ignore if none of these address your specific case.
Author
Owner

@mxro commented on GitHub (Jan 21, 2026):

I think I encounter a similar issue. Just posting here to double check if it is related.

Environment

  • Windows 11
  • Windows Terminal with Git Bash
  • opencode updated today via scoop

Issue

Sometimes when I use Ctrl + V, opencode displays Pasted ~xx lines and sometimes it just pastes whatever is in the clipboard as input. The latter is very annoying, since it will submit multiple messages, and often open multiple sessions that start doing mysterious things in the background.

I haven't found a pattern to this, but these things seem to make the issue less likely:

  • A newly opened opencode
  • When pasting at the beginning of a prompt.
@mxro commented on GitHub (Jan 21, 2026): I think I encounter a similar issue. Just posting here to double check if it is related. ## Environment - Windows 11 - Windows Terminal with Git Bash - opencode updated today via scoop ## Issue Sometimes when I use Ctrl + V, opencode displays `Pasted ~xx lines` and sometimes it just pastes whatever is in the clipboard as input. The latter is very annoying, since it will submit multiple messages, and often open multiple sessions that start doing mysterious things in the background. I haven't found a pattern to this, but these things seem to make the issue less likely: - A newly opened opencode - When pasting at the beginning of a prompt.
Author
Owner

@kundeng commented on GitHub (Jan 24, 2026):

Environment:

  • OS: Ubuntu 24.04.3 LTS (kernel 6.8.0-90)
  • VS Code: 1.108.2 (c9d77990917f3102ada88be140d28b038d1dd7c7)
  • Shell: /bin/bash
  • OpenCode: 1.1.34

Repro:

  1. Open VSCode integrated terminal
  2. Run opencode
  3. Try Enter / Shift+Enter / Ctrl+Enter — all submit immediately, no way to insert newline

Note: Ctrl+J and Ctrl+V are intercepted by VSCode; Shift+Enter doesn’t insert newline here.

@kundeng commented on GitHub (Jan 24, 2026): Environment: - OS: Ubuntu 24.04.3 LTS (kernel 6.8.0-90) - VS Code: 1.108.2 (c9d77990917f3102ada88be140d28b038d1dd7c7) - Shell: /bin/bash - OpenCode: 1.1.34 Repro: 1) Open VSCode integrated terminal 2) Run `opencode` 3) Try Enter / Shift+Enter / Ctrl+Enter — all submit immediately, no way to insert newline Note: Ctrl+J and Ctrl+V are intercepted by VSCode; Shift+Enter doesn’t insert newline here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4412