OpenCode displays/behaves incorrectly when launched inside Neovim’s terminal (running in Kitty) — works fine in Kitty directly #1496

Closed
opened 2026-02-16 17:31:15 -05:00 by yindo · 3 comments
Owner

Originally created by @blaadje on GitHub (Aug 26, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Description

When I launch opencode inside Neovim’s integrated terminal (with Neovim itself running inside Kitty), the TUI is broken: right border artifacts, misaligned input area, and unstable interaction.
When I launch opencode directly in a Kitty tab, everything works as expected.

Screenshot: left = Neovim :terminal running opencode (broken), right = Kitty terminal running opencode (OK).
(see attached image)

Steps to Reproduce

  • Open Kitty.

  • Start Neovim.

  • Open Neovim’s built-in terminal: :terminal.

  • Run opencode.

Compare the result with running opencode directly inside Kitty (without Neovim).

Observed Behavior

  • Broken TUI rendering inside Neovim’s terminal (right border cut off, input box misplaced).
  • Background stays black (instead of taking native background)
Image

Version: opencode v0.5.12 (shown in UI).

Expected Behavior

Should render and behave exactly the same as in Kitty: clean interface, stable input area, working shortcuts.

Environment

OS: Windows 10

Terminal: Kitty.

Neovim: running inside Kitty, with :terminal.

OpenCode: v0.5.12.

Note

For reference crush had similar issue at the beginning that has been fixed (couldn't find the right commit) cf

Image
Originally created by @blaadje on GitHub (Aug 26, 2025). Originally assigned to: @adamdotdevin on GitHub. ## Description When I launch opencode inside Neovim’s integrated terminal (with Neovim itself running inside Kitty), the TUI is broken: right border artifacts, misaligned input area, and unstable interaction. When I launch opencode directly in a Kitty tab, everything works as expected. Screenshot: left = Neovim :terminal running opencode (broken), right = Kitty terminal running opencode (OK). (see attached image) ## Steps to Reproduce - Open Kitty. - Start Neovim. - Open Neovim’s built-in terminal: :terminal. - Run opencode. Compare the result with running opencode directly inside Kitty (without Neovim). ## Observed Behavior - Broken TUI rendering inside Neovim’s terminal (right border cut off, input box misplaced). - Background stays black (instead of taking native background) <img width="2004" height="1898" alt="Image" src="https://github.com/user-attachments/assets/1acffcfd-31df-4012-aba0-f3274e75009b" /> Version: opencode v0.5.12 (shown in UI). ## Expected Behavior Should render and behave exactly the same as in Kitty: clean interface, stable input area, working shortcuts. ## Environment OS: Windows 10 Terminal: Kitty. Neovim: running inside Kitty, with :terminal. OpenCode: v0.5.12. ## Note For reference `crush` had similar issue at the beginning that has been fixed (couldn't find the right commit) cf <img width="3024" height="1964" alt="Image" src="https://github.com/user-attachments/assets/bbc9930a-96b9-4af1-95b5-f2331f5a9950" />
yindo closed this issue 2026-02-16 17:31:15 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 26, 2025):

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

  • #445: neovim nvim embedded terminal support request - Similar TUI rendering issues when running OpenCode inside Neovim terminal with broken layout, header off-screen, blank lines, and input focus problems
  • #240: Display issues inside Neovim terminal - TUI visually buggy inside Neovim terminal after rewrite, with display artifacts
  • #532: TUI isn't usable in Intellij's terminal - TUI rendering problems in IDE terminals (IntelliJ), showing similar patterns of terminal incompatibility
  • #408: TUI broken in Jetbrains console - TUI broken when executed within JetBrains console, showing layout issues
  • #2192: OpenCode is not aligned properly and messages are overlayed with each other in JetBrains IDE Terminal - Similar alignment and overlay issues in IDE terminals

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

@github-actions[bot] commented on GitHub (Aug 26, 2025): This issue might be a duplicate of existing issues. Please check: - #445: neovim nvim embedded terminal support request - Similar TUI rendering issues when running OpenCode inside Neovim terminal with broken layout, header off-screen, blank lines, and input focus problems - #240: Display issues inside Neovim terminal - TUI visually buggy inside Neovim terminal after rewrite, with display artifacts - #532: TUI isn't usable in Intellij's terminal - TUI rendering problems in IDE terminals (IntelliJ), showing similar patterns of terminal incompatibility - #408: TUI broken in Jetbrains console - TUI broken when executed within JetBrains console, showing layout issues - #2192: OpenCode is not aligned properly and messages are overlayed with each other in JetBrains IDE Terminal - Similar alignment and overlay issues in IDE terminals Feel free to ignore if none of these address your specific case.
Author
Owner

@blaadje commented on GitHub (Aug 26, 2025):

Closing this as system theme provided by env variable fixed the layout issue. (fish : set -x OPENCODE_THEME system)

Still scrolling through content in normal mode is not possible, which is basically why I would use opencode in nvim.

@blaadje commented on GitHub (Aug 26, 2025): Closing this as `system` theme provided by env variable fixed the layout issue. (fish : `set -x OPENCODE_THEME system`) Still scrolling through content in **normal mode** is not possible, which is basically why I would use opencode in nvim.
Author
Owner

@hongkongkiwi commented on GitHub (Sep 20, 2025):

This absolutely doesn't fix the issue for me. Scrolling no matter the theme only scrolls through the command window! Not the actual chat output (which is what I want).

@hongkongkiwi commented on GitHub (Sep 20, 2025): This absolutely doesn't fix the issue for me. Scrolling no matter the theme only scrolls through the command window! Not the actual chat output (which is what I want).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1496