Line breaks do not work any more in the latest version #2777

Closed
opened 2026-02-16 17:37:12 -05:00 by yindo · 20 comments
Owner

Originally created by @juridiener on GitHub (Nov 11, 2025).

Originally assigned to: @kommander on GitHub.

Description

Hello, before I had the version 0.15.
Yesterday I updated to the latest and recognized the line breaks in the chat don't work anymore.

So, Shift+Enter sends the message instead of creating the line break.

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

WezTerm

Originally created by @juridiener on GitHub (Nov 11, 2025). Originally assigned to: @kommander on GitHub. ### Description Hello, before I had the version 0.15. Yesterday I updated to the latest and recognized the line breaks in the chat don't work anymore. So, Shift+Enter sends the message instead of creating the line break. ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal WezTerm
yindo added the bug label 2026-02-16 17:37:12 -05:00
yindo closed this issue 2026-02-16 17:37:12 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 11, 2025):

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

  • #4046: Nearly identical issue - Shift-return does not input newline since 1.0
  • #1505: Detailed issue with extensive analysis - shift+enter keybinding not working
  • #4168: Same symptom - Shift-Enter sends message instead of adding newline (closed recently)

These issues all describe the same problem: Shift+Enter stopped creating newlines and now sends messages instead after upgrading to version 1.0+. Issue #1505 has 67 comments with technical analysis and is already assigned to @kommander.

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

@github-actions[bot] commented on GitHub (Nov 11, 2025): This issue might be a duplicate of existing issues. Please check: - #4046: Nearly identical issue - Shift-return does not input newline since 1.0 - #1505: Detailed issue with extensive analysis - shift+enter keybinding not working - #4168: Same symptom - Shift-Enter sends message instead of adding newline (closed recently) These issues all describe the same problem: Shift+Enter stopped creating newlines and now sends messages instead after upgrading to version 1.0+. Issue #1505 has 67 comments with technical analysis and is already assigned to @kommander. Feel free to ignore if none of these address your specific case.
Author
Owner

@kommander commented on GitHub (Nov 11, 2025):

I am on it.

@kommander commented on GitHub (Nov 11, 2025): I am on it.
Author
Owner

@juridiener commented on GitHub (Nov 11, 2025):

I am on it.

Ok thanks :)

@juridiener commented on GitHub (Nov 11, 2025): > I am on it. Ok thanks :)
Author
Owner

@cwegener commented on GitHub (Nov 11, 2025):

You can use Ctrl + J as a workaround to send a line feed control character.

@cwegener commented on GitHub (Nov 11, 2025): You can use `Ctrl + J` as a workaround to send a line feed control character.
Author
Owner

@kommander commented on GitHub (Nov 12, 2025):

This should be better in the latest version?

@kommander commented on GitHub (Nov 12, 2025): This should be better in the latest version?
Author
Owner

@RockBacon9922 commented on GitHub (Nov 13, 2025):

yes still doesn't work for me

Sonoma 14.7.6 (23H626)

@RockBacon9922 commented on GitHub (Nov 13, 2025): yes still doesn't work for me Sonoma 14.7.6 (23H626)
Author
Owner

@kommander commented on GitHub (Nov 13, 2025):

shift+enter mapping is broken currently, use shift+return in your config, that should work.

@kommander commented on GitHub (Nov 13, 2025): `shift+enter` mapping is broken currently, use `shift+return` in your config, that should work.
Author
Owner

@gabrielrinaldi commented on GitHub (Nov 24, 2025):

Using Ghostty+Tmux does not work for me, on Ghostty things work fine (I am on NixOS), but once I am inside tmux Shift+Enter and Ctrl+J do not do anything.

I've tried adding to Tmux:

extended-keys always
extended-keys-format csi-u

But that also did not change anything. Changing the keybinds for OpenCode also did not solve the issue. Is this an issue with Tmux?

@gabrielrinaldi commented on GitHub (Nov 24, 2025): Using Ghostty+Tmux does not work for me, on Ghostty things work fine (I am on NixOS), but once I am inside tmux Shift+Enter and Ctrl+J do not do anything. I've tried adding to Tmux: ``` extended-keys always extended-keys-format csi-u ``` But that also did not change anything. Changing the keybinds for OpenCode also did not solve the issue. Is this an issue with Tmux?
Author
Owner

@cwegener commented on GitHub (Nov 24, 2025):

Using Ghostty+Tmux does not work for me, on Ghostty things work fine

Can confirm. Shift + Enter works fine in Ghostty (outside tmux). But inside tmux, Shift + Enter does not create a new line but instead sends the prompt to the agent.

EDIT The behaviour inside tmux is the same in all other terminal emulators I've tested too.

@cwegener commented on GitHub (Nov 24, 2025): > Using Ghostty+Tmux does not work for me, on Ghostty things work fine Can confirm. `Shift + Enter` works fine in Ghostty (outside tmux). But inside tmux, `Shift + Enter` does not create a new line but instead sends the prompt to the agent. **EDIT** The behaviour inside `tmux` is the same in all other terminal emulators I've tested too.
Author
Owner

@gabrielrinaldi commented on GitHub (Nov 25, 2025):

I love OpenCode, but I love tmux more, so it is pretty hard the flow right now, also on tmux OpenCode freezes constantly (the UI, because if I press enter on a prompt for example it will perform the action but not update the UI). Not sure if any of the OpenCode team is using tmux. But I try Claude Code from time to time and always come back to OpenCode, it is so much better.

@gabrielrinaldi commented on GitHub (Nov 25, 2025): I love OpenCode, but I love `tmux` more, so it is pretty hard the flow right now, also on `tmux` OpenCode freezes constantly (the UI, because if I press enter on a prompt for example it will perform the action but not update the UI). Not sure if any of the OpenCode team is using `tmux`. But I try Claude Code from time to time and always come back to OpenCode, it is so much better.
Author
Owner

@kommander commented on GitHub (Nov 25, 2025):

I use tmux myself (although not a fan at all anymore, especially because there was no release in almost a year) and this is annoying me myself very much, I need to look into that again. Tmux just messes everything up so bad.

@kommander commented on GitHub (Nov 25, 2025): I use tmux myself (although not a fan at all anymore, especially because there was no release in almost a year) and this is annoying me myself very much, I need to look into that again. Tmux just messes everything up so bad.
Author
Owner

@cwegener commented on GitHub (Nov 26, 2025):

also on tmux OpenCode freezes constantly

That's interesting. I exclusively use opencode in tmux. I have not experienced 'freezes' that I know of. Is there a minimal repro for this issue that you can share?

@cwegener commented on GitHub (Nov 26, 2025): > also on tmux OpenCode freezes constantly That's interesting. I exclusively use `opencode` in tmux. I have not experienced 'freezes' that I know of. Is there a minimal repro for this issue that you can share?
Author
Owner

@gabrielrinaldi commented on GitHub (Nov 27, 2025):

@cwegener I can share my tmux config, but I don't use opencode outside tmux, so not sure if it is a problem on opencode or tmux. Is sharing my config helpful? Sometimes if I just leave the opencode window open and go to the bathroom real quick while it is waiting for a response it is enough to freeze it, so I need to kill the pane and restore the session.

@gabrielrinaldi commented on GitHub (Nov 27, 2025): @cwegener I can share my tmux config, but I don't use opencode outside tmux, so not sure if it is a problem on opencode or tmux. Is sharing my config helpful? Sometimes if I just leave the opencode window open and go to the bathroom real quick while it is waiting for a response it is enough to freeze it, so I need to kill the pane and restore the session.
Author
Owner

@gabrielrinaldi commented on GitHub (Nov 27, 2025):

@kommander me too, but I tried Zellij a few times and it is not there for me, maybe I am too old to relearn things. My whole flow is tmux based, cli usage and everything, so hard to switch :(

@gabrielrinaldi commented on GitHub (Nov 27, 2025): @kommander me too, but I tried Zellij a few times and it is not there for me, maybe I am too old to relearn things. My whole flow is tmux based, cli usage and everything, so hard to switch :(
Author
Owner

@cwegener commented on GitHub (Nov 27, 2025):

Sometimes if I just leave the opencode window open and go to the bathroom real quick while it is waiting for a response it is enough to freeze it, so I need to kill the pane and restore the session.

Ok. I certainly have never experienced such an issue. Maybe open a new issue for it, since this issue is about something else.

@cwegener commented on GitHub (Nov 27, 2025): > Sometimes if I just leave the opencode window open and go to the bathroom real quick while it is waiting for a response it is enough to freeze it, so I need to kill the pane and restore the session. Ok. I certainly have never experienced such an issue. Maybe open a new issue for it, since this issue is about something else.
Author
Owner

@kommander commented on GitHub (Nov 28, 2025):

The bathroom issue is known and worked on I think, that is a web socket disconnect without automatic reconnect.

@kommander commented on GitHub (Nov 28, 2025): The bathroom issue is known and worked on I think, that is a web socket disconnect without automatic reconnect.
Author
Owner

@gabrielrinaldi commented on GitHub (Nov 29, 2025):

Line breaks are working for me again on the latest version! Thank you

@gabrielrinaldi commented on GitHub (Nov 29, 2025): Line breaks are working for me again on the latest version! Thank you
Author
Owner

@Nindaleth commented on GitHub (Dec 1, 2025):

On Terminator terminal on 1.0.124 on Linux, neither "input_newline": "shift+return,ctrl+j", nor "input_newline": "shift+enter,ctrl+j", make the shift+enter work for me, but ctrl+j works. This is reported by terminator:

# echo $TERM
xterm-256color
@Nindaleth commented on GitHub (Dec 1, 2025): On Terminator terminal on 1.0.124 on Linux, neither `"input_newline": "shift+return,ctrl+j"`, nor `"input_newline": "shift+enter,ctrl+j",` make the shift+enter work for me, but ctrl+j works. This is reported by terminator: ``` # echo $TERM xterm-256color ```
Author
Owner

@kommander commented on GitHub (Dec 20, 2025):

The Terminator terminal does not support modifyOtherKeys or the kitty keyboard protocol. You need to manually add a keybinding for the terminal to send \n for shift+enter.

@kommander commented on GitHub (Dec 20, 2025): The Terminator terminal does not support modifyOtherKeys or the kitty keyboard protocol. You need to manually add a keybinding for the terminal to send `\n` for `shift+enter`.
Author
Owner

@Nindaleth commented on GitHub (Dec 20, 2025):

@kommander thank you for your work on OpenTUI!

And also for your last comment, it made me check whether I could force Terminator to do this and it turns out I can.
I've vibe coded a plugin that allows inserting a literal newline.

@Nindaleth commented on GitHub (Dec 20, 2025): @kommander thank you for your work on OpenTUI! And also for your last comment, it made me check whether I could force Terminator to do this and it turns out I can. I've vibe coded [a plugin](https://gist.github.com/Nindaleth/3ac59051451119453012cd47b252f898) that allows inserting a literal newline.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2777