Copy & Newline Not Working in macOS Default Terminal #8451

Open
opened 2026-02-16 18:10:00 -05:00 by yindo · 5 comments
Owner

Originally created by @Rishabh250 on GitHub (Feb 3, 2026).

Originally assigned to: @kommander on GitHub.

Description

When running OpenCode in macOS Default Terminal.app, I’m unable to:

  • Copy selected text
  • Insert a new line while typing prompts

This makes OpenCode nearly unusable in interactive mode.

Environment

  • OS: macOS (Sonoma / Ventura – reproducible on default Terminal.app)
  • Terminal: macOS Terminal.app (default)
  • Shell: zsh
  • OpenCode Version: latest
  • Node Version: node -v
  • Installation: CLI (opencode)

Steps to Reproduce

  1. Open Terminal.app
  2. Run opencode
  3. Try selecting text and copying (Cmd + C or right-click)
  4. Try inserting a new line while typing a prompt (Enter / Cmd+Enter)

Expected Behavior

  • Text selection should be copyable using Cmd + C
  • Enter should create a new line in the editor (or documented keybinding)

Actual Behavior

  • Copy does not work
  • Enter submits instead of inserting a new line
  • No way to insert multi-line prompts in Terminal.app

Additional Notes

  • This appears to be a terminal input handling issue

  • Likely related to:

    • raw mode / TTY handling
    • readline / ink / blessed-style input
  • Works better (or differently) in iTerm2 (needs confirmation)

Impact
High — makes OpenCode difficult to use on macOS without switching terminals.

Plugins

No response

OpenCode version

latest

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 26.2

Terminal

No response

Originally created by @Rishabh250 on GitHub (Feb 3, 2026). Originally assigned to: @kommander on GitHub. ### Description When running OpenCode in **macOS Default Terminal.app**, I’m unable to: * Copy selected text * Insert a new line while typing prompts This makes OpenCode nearly unusable in interactive mode. **Environment** * OS: macOS (Sonoma / Ventura – reproducible on default Terminal.app) * Terminal: macOS **Terminal.app** (default) * Shell: zsh * OpenCode Version: *latest* * Node Version: `node -v` * Installation: CLI (`opencode`) **Steps to Reproduce** 1. Open **Terminal.app** 2. Run `opencode` 3. Try selecting text and copying (Cmd + C or right-click) 4. Try inserting a new line while typing a prompt (Enter / Cmd+Enter) **Expected Behavior** * Text selection should be copyable using Cmd + C * Enter should create a new line in the editor (or documented keybinding) **Actual Behavior** * Copy does not work * Enter submits instead of inserting a new line * No way to insert multi-line prompts in Terminal.app **Additional Notes** * This appears to be a terminal input handling issue * Likely related to: * raw mode / TTY handling * readline / ink / blessed-style input * Works better (or differently) in iTerm2 (needs confirmation) **Impact** High — makes OpenCode difficult to use on macOS without switching terminals. ### Plugins _No response_ ### OpenCode version latest ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System macOS 26.2 ### Terminal _No response_
yindo added the opentuibug labels 2026-02-16 18:10:00 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 3, 2026):

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

  • #7248: Unable to insert new line in prompt box in macOS basic Terminal - same OS, same problem with newline
  • #7861: macOS Terminal becomes unusable after opencode exits - related Terminal.app issues
  • #4461: Input text is black on black - macOS Terminal.app display issue
  • #9836: Feature request for Shift+Enter to insert newline instead of sending - directly related
  • #2820: How to insert a new line into the prompt box (macOS + Ghostty) - similar UX issue
  • #7297: CLI input issues on WSL Ubuntu with no multiline input and copy/paste not working - related input/multiline problem across platforms

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

@github-actions[bot] commented on GitHub (Feb 3, 2026): This issue might be a duplicate of existing issues. Please check: - #7248: Unable to insert new line in prompt box in macOS basic Terminal - same OS, same problem with newline - #7861: macOS Terminal becomes unusable after opencode exits - related Terminal.app issues - #4461: Input text is black on black - macOS Terminal.app display issue - #9836: Feature request for Shift+Enter to insert newline instead of sending - directly related - #2820: How to insert a new line into the prompt box (macOS + Ghostty) - similar UX issue - #7297: CLI input issues on WSL Ubuntu with no multiline input and copy/paste not working - related input/multiline problem across platforms Feel free to ignore if none of these address your specific case.
Author
Owner

@kommander commented on GitHub (Feb 3, 2026):

Enter is meant to submit the prompt, shift+enter usually does newline. Terminal.app does not support shift+enter detection though. Option+enter might work. Selected text is automatically copied, there is no shortcut for it, unless you use native terminal selection.

Opencode has nothing to do with node, it uses Bun.

@kommander commented on GitHub (Feb 3, 2026): Enter is meant to submit the prompt, shift+enter usually does newline. Terminal.app does not support shift+enter detection though. Option+enter might work. Selected text is automatically copied, there is no shortcut for it, unless you use native terminal selection. Opencode has nothing to do with node, it uses Bun.
Author
Owner

@justfortheloveof commented on GitHub (Feb 3, 2026):

For what it's worth, if for whatever reason copy on select isn't working in OpenCode, try holding shift while you select text.
(Most terminals support this, holding shift will make it so you have "normal" terminal selection instead of it being controlled by the TUI)

@justfortheloveof commented on GitHub (Feb 3, 2026): For what it's worth, if for whatever reason copy on select isn't working in OpenCode, try holding shift while you select text. (Most terminals support this, holding shift will make it so you have "normal" terminal selection instead of it being controlled by the TUI)
Author
Owner

@nmarley commented on GitHub (Feb 3, 2026):

The "Copy to Clipboard" functionality isn't working on Ghostty either. This just started with the latest version. It says "Copied to clipboard" toward the top-right, but nothing gets copied to the clipboard.

@nmarley commented on GitHub (Feb 3, 2026): The "Copy to Clipboard" functionality isn't working on Ghostty either. This just started with the latest version. It says "Copied to clipboard" toward the top-right, but nothing gets copied to the clipboard.
Author
Owner

@nmarley commented on GitHub (Feb 4, 2026):

Clipboard issue seems to be fixed in 1.1.51, using Ghostty + tmux w/macOS 26.

@nmarley commented on GitHub (Feb 4, 2026): Clipboard issue seems to be fixed in 1.1.51, using Ghostty + tmux w/macOS 26.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8451