Terminal cursor blinks in opencode even though it shouldn't #1290

Open
opened 2026-02-16 17:30:19 -05:00 by yindo · 13 comments
Owner

Originally created by @sschwarzer on GitHub (Aug 13, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Thanks a lot for Opencode, it's awesome! :-)

I have my terminal (Gnome Terminal 3.54.4) set to a non-blinking cursor because I find a blinking cursor quite distracting.

Since the release of Opencode 0.4.27 the non-blinking is no longer respected; the cursor blinks. In version 0.4.26 the cursor didn't blink, as configured in the terminal.

The cursor can be made non-blinking temporarily by resetting the terminal from its menu, but the blinking returns shortly after.

Maybe this was due to the change fix: use real cursor instead of virtual cursor?

Originally created by @sschwarzer on GitHub (Aug 13, 2025). Originally assigned to: @adamdotdevin on GitHub. Thanks a lot for Opencode, it's awesome! :-) I have my terminal (Gnome Terminal 3.54.4) set to a non-blinking cursor because I find a blinking cursor quite distracting. Since the release of Opencode 0.4.27 the non-blinking is no longer respected; the cursor blinks. In version 0.4.26 the cursor didn't blink, as configured in the terminal. The cursor can be made non-blinking _temporarily_ by resetting the terminal from its menu, but the blinking returns shortly after. Maybe this was due to the change [fix: use real cursor instead of virtual cursor](https://github.com/sst/opencode/commit/b2f2c9ac37e05455c282bf4106a5288d3a1478b3)?
Author
Owner

@aashish2057 commented on GitHub (Aug 13, 2025):

also have this issue

@aashish2057 commented on GitHub (Aug 13, 2025): also have this issue
Author
Owner

@AlexSlayerLoop commented on GitHub (Aug 13, 2025):

same issue and when I /exit the blinking persist on the current terminal tab/window

@AlexSlayerLoop commented on GitHub (Aug 13, 2025): same issue and when I /exit the blinking persist on the current terminal tab/window
Author
Owner

@stordahl commented on GitHub (Aug 14, 2025):

I have the same behavior as @AlexSlayerLoop where the blinking persists after closing opencode

@stordahl commented on GitHub (Aug 14, 2025): I have the same behavior as @AlexSlayerLoop where the blinking persists after closing opencode
Author
Owner

@rekram1-node commented on GitHub (Aug 14, 2025):

We will look into this

@rekram1-node commented on GitHub (Aug 14, 2025): We will look into this
Author
Owner

@Mr-Robot-err-404 commented on GitHub (Aug 19, 2025):

Had the same experience with ghostty

@Mr-Robot-err-404 commented on GitHub (Aug 19, 2025): Had the same experience with ghostty
Author
Owner

@seanmamasde commented on GitHub (Sep 9, 2025):

facing this problem using wezterm as well, on windows 11 24H2 build 26120.1843

@seanmamasde commented on GitHub (Sep 9, 2025): facing this problem using wezterm as well, on windows 11 24H2 build 26120.1843
Author
Owner

@rekram1-node commented on GitHub (Sep 9, 2025):

I imagine this will be fixed post opentui migration that should wrap up this week

@rekram1-node commented on GitHub (Sep 9, 2025): I imagine this will be fixed post opentui migration that should wrap up this week
Author
Owner

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

Still happening with opentui.

I have not been able to figure out why it's happening. I wonder if there is a random escape sequence hard-coded somewhere.

@cwegener commented on GitHub (Nov 2, 2025): Still happening with opentui. I have not been able to figure out why it's happening. I wonder if there is a random escape sequence hard-coded somewhere.
Author
Owner

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

Hmm .. I can't find a download for bun that has debug symbols enabled. Anybody know how to get symbols for bun in gdb?

@cwegener commented on GitHub (Nov 2, 2025): Hmm .. I can't find a download for bun that has debug symbols enabled. Anybody know how to get symbols for bun in gdb?
Author
Owner

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

Ok. After a bit of reading and testing and looking at strace outputs, I think that the reason is because opentui doesn't support configurable cursor shapes for its edit/input buffers:

ug -r setCursorStyle packages/core/src/renderables
packages/core/src/renderables/EditBufferRenderable.ts
   420:     this._ctx.setCursorStyle("block", true)
   425:     this._ctx.setCursorStyle("block", true)

packages/core/src/renderables/Input.ts
   101:     this._ctx.setCursorStyle("block", true)

@cwegener commented on GitHub (Nov 3, 2025): Ok. After a bit of reading and testing and looking at `strace` outputs, I think that the reason is because `opentui` doesn't support configurable cursor shapes for its edit/input buffers: ``` ug -r setCursorStyle packages/core/src/renderables packages/core/src/renderables/EditBufferRenderable.ts 420: this._ctx.setCursorStyle("block", true) 425: this._ctx.setCursorStyle("block", true) packages/core/src/renderables/Input.ts 101: this._ctx.setCursorStyle("block", true) ```
Author
Owner

@pchampio commented on GitHub (Jan 15, 2026):

Hi,
Ever since https://github.com/anomalyco/opentui/pull/267
OpenTui has a cursorStyle configuration, is all that is left to do is to expose this configuration to opencode ?
I'll love to disable cursor blinking!

@pchampio commented on GitHub (Jan 15, 2026): Hi, Ever since https://github.com/anomalyco/opentui/pull/267 OpenTui has a `cursorStyle` configuration, is all that is left to do is to expose this configuration to opencode ? I'll love to disable cursor blinking!
Author
Owner

@OliverWich commented on GitHub (Jan 22, 2026):

I would also love this option exposed via opencode as well, simply for changing away from the default block cursor to line.

I understand why block is the default, but coming from an nvim workflow (with opencode running inside nvim via something like sidekick.nvim) seeing the block cursor indicates "normal" mode, which is a bit confusing for a split second as opencode always operates with "insert" mode like behavior.

@OliverWich commented on GitHub (Jan 22, 2026): I would also love this option exposed via opencode as well, simply for changing away from the default `block` cursor to `line`. I understand why `block` is the default, but coming from an nvim workflow (with opencode running inside nvim via something like sidekick.nvim) seeing the block cursor indicates "normal" mode, which is a bit confusing for a split second as opencode always operates with "insert" mode like behavior.
Author
Owner

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

Looks like PR #11300 fixes this. Until the PR gets merged, a hack I have been doing is entering /editor mode and exiting. For some reason this stops the cursor from blinking.

https://github.com/user-attachments/assets/75bc611c-c2fd-4a34-9c6b-4e58176c4fa1

@TylerHillery commented on GitHub (Feb 4, 2026): Looks like PR #11300 fixes this. Until the PR gets merged, a hack I have been doing is entering `/editor` mode and exiting. For some reason this stops the cursor from blinking. https://github.com/user-attachments/assets/75bc611c-c2fd-4a34-9c6b-4e58176c4fa1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1290