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
{{ message }}
Repository navigation
EDITOR=nvim hangs & some characters seem to pass to the opencode instead of nvim #4209
Using opencode v1.0.57, and
export EDITOR=/usr/local/bin/nvim (nvim 0.11.2)
When I switch to nvim editor (+x e)
The vim editor seems to grab less than half of the key stroke / hangs...
When we can finally type the :q! in the nvim editor, we can see that some characters were inserted in the opencode UI such as ":q!::::qqqqq" (the number of tries we had to type to finally exit nvim)
It seems both foreground nvim and background opencode fight to get the keyboard.
The problem does not occur with old v0.5.13 but seems to occur from version 1.0.0.
OpenCode version
v1.0.57
Steps to reproduce
switch to nvim editor (+x e)
try to edit or enter some text
The nvim freezes every second or so. It gets difficult even to quit it (:q!)
After entering editor mode via /editor, input is erratic. Keystrokes are frequently missed or require multiple presses to register (behaving like a race condition on stdin), making the editor unusable until I kill the process.
Environment:
OS: Linux Fedora 42
Terminal: Ghostty 1.2.3-1.fc42
Neovim:v0.12.0-dev+1665-69b286c3b
Reacted by Ulf Ninow, gabriel montagné, Ishan and Tamir Zahavi-Brunner
@veracioux may have the right idea to fix this in opentui, but I also offer #4595 in the theory that it is a good idea to turn off raw mode for the duration of the editor session. In other words, give the editor the keyboard input. (Edit: After further testing, I closed that PR, as it was not effective after all. The issue on my machine came and went, causing me to think this had fixed it when in fact it did not.)
I'm encountering the exact same problem as described in the original issue, still present in v1.0.80.
Description
After entering editor mode using the /editor command, keyboard input becomes extremely erratic:
Many keystrokes are completely ignored, then after closing edior TUI crashes
Some keys require multiple presses (sometimes 3–10 times) before they register
Environment
OS: 6.17.8-arch1-1 -- Hyprland Terminal: foot Affected editors:
Neovim: NVIM v0.11.5 → Not working
Temporary fix
export EDITOR="foot -e nvim" --> It opens nvim in a different terminal and reopens the tui at terminal close
Reacted by Chen-Sheng Lin
Reacted by Jonathan Bowman, gabriel montagné, Dmytro Klymenko, Emmanuel Isenah and Mo
Temporary fix export EDITOR="foot -e nvim" --> It opens nvim in a different terminal and reopens the tui at terminal close
@hamidi-dev and others, don't forget the good workaround from @the-coding-doggo -- if you set VISUAL or EDITOR to a terminal command that launches your editor, the experience is pretty smooth.
That is, just while we wait a short while for a fix to land... The PR from @veracioux was merged into opentui yesterday and is available in opentui 0.1.49. So, once opencode is using opentui 0.1.49, all will be well.
For the impatient, bun add @opentui/core@0.1.49 @opentui/solid@0.1.49 in the packages/opencode directory works wonders.
Reacted by Mo, Jordy Gonzalez, Emmanuel Isenah and Sebastian
Activity
github-actions commentedon Nov 11, 2025
This issue might be a duplicate of existing issues. Please check:
/editorcommand fails silently when using neovim-remote in Neovim terminal #1213: Similar issue with neovim-remote failing silently when using/editorcommand in Neovim terminal, also causing editor functionality problemsFeel free to ignore if none of these address your specific case.
Pivert commentedon Nov 11, 2025
So far, I did try:
lennox-davidlevy commentedon Nov 20, 2025
I am experiencing this same issue on v1.0.80.
After entering editor mode via
/editor, input is erratic. Keystrokes are frequently missed or require multiple presses to register (behaving like a race condition on stdin), making the editor unusable until I kill the process.Environment:
1.2.3-1.fc42v0.12.0-dev+1665-69b286c3bfnumatic commentedon Nov 20, 2025
Same issue on version 1.0.80
I'm encountering the exact same problem as described in the original issue, still present in v1.0.80.
Description
After entering editor mode using the
/editorcommand, keyboard input becomes extremely erratic:Environment
NVIM v0.11.5→ Not workingVIM - Vi IMproved 9.1→ Not workingGNU nano 8.4→ Works perfectlygabrielmontagne commentedon Nov 20, 2025
I have the same issue with plain VIM (8.2 and 9.0); noticied it today running OC 1.0.80.
If I rollback just to 1.0.77 it seems to work ok for me.
lennox-davidlevy commentedon Nov 20, 2025
@gabrielmontagne I can confirm, rolling back to 1.0.77 is working for me as well.
fnumatic commentedon Nov 20, 2025
for me v1.0.78 is the last good version
v1.0.79 starts to fail
probably:
9c85a37
bowmanjd commentedon Nov 21, 2025
@veracioux may have the right idea to fix this in opentui, but I also offer #4595 in the theory that it is a good idea to turn off raw mode for the duration of the editor session. In other words, give the editor the keyboard input. (Edit: After further testing, I closed that PR, as it was not effective after all. The issue on my machine came and went, causing me to think this had fixed it when in fact it did not.)
the-coding-doggo commentedon Nov 21, 2025
Same issue on version 1.0.85
I'm encountering the exact same problem as described in the original issue, still present in v1.0.80.
Description
After entering editor mode using the /editor command, keyboard input becomes extremely erratic:
Many keystrokes are completely ignored, then after closing edior TUI crashes
Some keys require multiple presses (sometimes 3–10 times) before they register
Environment
OS: 6.17.8-arch1-1 -- Hyprland
Terminal: foot
Affected editors:
Neovim: NVIM v0.11.5 → Not working
Temporary fix
export EDITOR="foot -e nvim" --> It opens nvim in a different terminal and reopens the tui at terminal close
hamidi-dev commentedon Nov 23, 2025
same issue here on MacOS + Iterm2 + tmux. And in Ubuntu WSL + tmux.
I am now also stuck on 1.0.78, the last "good" version
bowmanjd commentedon Nov 23, 2025
@hamidi-dev and others, don't forget the good workaround from @the-coding-doggo -- if you set VISUAL or EDITOR to a terminal command that launches your editor, the experience is pretty smooth.
That is, just while we wait a short while for a fix to land... The PR from @veracioux was merged into opentui yesterday and is available in opentui 0.1.49. So, once opencode is using opentui 0.1.49, all will be well.
For the impatient,
bun add @opentui/core@0.1.49 @opentui/solid@0.1.49in thepackages/opencodedirectory works wonders.kommander commentedon Nov 23, 2025
Is live now with 1.0.106, better?
bowmanjd commentedon Nov 23, 2025
Yes, all better now! Thank you so much.
fnumatic commentedon Nov 24, 2025
v1.0.106 fixed, thank you