TUI composer cursor should visibly blink while editing

Open 💬 3 comments Opened May 22, 2026 by 60ke

Problem

When the TUI composer has input focus, the insertion point can be hard to spot because normal editing currently relies on the terminal default cursor shape. In terminals where that default is steady or visually subtle, users may not immediately know where typed text will land.

This is especially noticeable in the bottom composer because most of the UI is static while the user is deciding what to type next. A visible blinking edit cursor would make the active insertion point easier to find.

Desired behavior

When the composer is actively editable, show an explicit blinking edit cursor. Vim normal mode should remain visually distinct from insert/editing mode.

This should be considered alongside existing cursor-style issues such as #21666 and #21828 so the fix does not make embedded terminal cursor reset/flicker behavior worse.

Reference implementation

I prepared a small reference branch on my fork:

https://github.com/60ke/codex/tree/codex/blinking-composer-cursor

Current local approach:

  • Use SetCursorStyle::BlinkingBar for composer editing, including the default keymap and Vim insert mode.
  • Keep Vim normal mode on DefaultUserShape so it remains visually distinct.
  • Update the existing composer cursor-style test.

I am opening this issue first because docs/contributing.md says external code contributions are by invitation only. If the Codex team agrees with the direction, I can submit the prepared branch as a PR.

Validation on the reference branch

  • just fmt
  • cargo test -p codex-tui insert_input_uses_blinking_bar_cursor_style
  • just fix -p codex-tui

I also attempted cargo test -p codex-tui; it compiled successfully but aborted in unrelated app::tests::discard_side_thread_keeps_local_state_when_server_close_fails with a stack overflow.

View original on GitHub ↗

3 Comments

60ke · 3 months ago

Additional note: I have already made the corresponding code changes on a fork branch so the implementation can be reviewed if the team agrees with the direction.

Reference branch:
https://github.com/60ke/codex/tree/codex/blinking-composer-cursor

Commit:
cde289eea0 Make composer cursor blink while editing

The change is intentionally small: it updates the TUI composer cursor style to use an explicit blinking bar while editing, keeps Vim normal mode visually distinct, updates the existing cursor-style test, and removes a now-unused helper. If this enhancement is welcome, I can open the prepared branch as a PR.

kevina · 3 months ago

If this is implemented can you please make it an option. I personally find a blinking bar in the terminal very distracting. I specifically turn this feature off for the few terminal apps that change the cursor style.

60ke · 3 months ago

Thanks, agreed — I updated the reference branch so the blinking composer cursor is opt-in instead of the default behavior.

Current branch: https://github.com/60ke/codex/tree/codex/blinking-composer-cursor
Compare: https://github.com/openai/codex/compare/main...60ke:codex:codex/blinking-composer-cursor?expand=1

Configuration:

[tui]
composer_blinking_cursor = true

Default remains false, so users who find blinking distracting keep the terminal's normal cursor behavior. When enabled, the composer uses a blinking bar while editing and keeps the default cursor shape in Vim normal mode.

Validation run locally:

  • just write-config-schema
  • just fmt
  • cargo test -p codex-tui insert_input_uses_configured_blinking_bar_cursor_style
  • cargo test -p codex-core tui_composer_blinking_cursor
  • cargo test -p codex-core config_schema_matches_fixture
  • cargo test -p codex-config
  • just fix -p codex-config -p codex-core -p codex-tui