Option to preserve cursor blinking in terminal

Resolved 💬 2 comments Opened Apr 9, 2026 by gsaenz-mo Closed Apr 9, 2026

Problem

Claude Code sends \e[?12l (DEC private mode 12 reset) during TUI initialization, which disables cursor blinking in the terminal. There is no configuration option to prevent this behavior.

This affects users who have cursor blinking enabled in their terminal profile (e.g., iTerm2, PyCharm terminal). Even with terminal-level settings like iTerm2's "Allow application cursor shape change" unchecked, the blinking is still disabled because Claude Code explicitly sends the escape code to turn it off.

Expected behavior

Claude Code should either:

  1. Not send \e[?12l (preserve the terminal's existing cursor state), or
  2. Provide a configuration option (e.g., in settings.json) to prevent overriding the cursor blink state.

Workaround attempted

  • Tried SessionStart hook with printf '\e[?12h' and printf '\e[1 q' — ineffective because Claude Code resets the cursor after the hook runs.
  • iTerm2 "Blinking cursor" profile setting — overridden by Claude Code's escape codes.

Environment

  • Claude Code v2.1.97
  • Terminal: iTerm2 / PyCharm integrated terminal
  • OS: macOS

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗