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
[FEATURE] Make TUI cursor style configurable (thin/line cursor instead of forced block) #32209
opencode's TUI forces the terminal cursor to a block shape, overriding the user's terminal-emulator cursor preference. It would be great to make the cursor style configurable (e.g. a thin/line cursor) like the cursor color already is.
Current behavior
The terminal is configured with a thin (bar/beam) cursor.
On launching opencode, the cursor switches to a block while the prompt is focused.
On exit, opencode restores the cursor shape (ESC [ 0 q) and color (ESC ] 112 BEL), so the behavior is clearly driven by opencode, not the terminal.
There is no opencode.json field to change this (confirmed against https://opencode.ai/config.json).
Root cause
opencode uses OpenTUI (@opencode-ai/tui → @opentui/core). The EditBufferRenderable (the prompt input) defaults its cursor style to block:
…and exposes a writable cursorStyle on the edit buffer, which it translates into DECSCUSR escape sequences.
However, opencode's prompt component only sets cursorColor, never cursorStyle:
packages/tui/src/component/prompt/index.tsx
if(props.disabled)input.cursorColor=theme.backgroundElementif(!props.disabled)input.cursorColor=theme.text// cursorStyle is never set -> falls back to OpenTUI's "block" default
Proposal
Expose the cursor style via config (e.g. opencode.json or the theme), so users can pick e.g. a thin/line cursor. Minimal change would be passing cursorStyle through to the input alongside cursorColor, e.g. input.cursorStyle = { style: "line", blinking: true }.
Activity
github-actions commentedon Jun 13, 2026
This issue might be a duplicate of existing issues. Please check: