[FEATURE] Customise cursor style

Status Open
Maintainer reply None cached
Activity 14 comments · opened Jan 26, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Two issues previously proposed this, but were incorrectly closed:

As we see here, there's interest in customising cursor style: https://github.com/anthropics/claude-code/issues/7990#issuecomment-3455579821

Proposed Solution

Flags in settings.json and Claude Code /settings for type of cursor (e.g. bar). Refer to the above-referenced issues for more concrete recommendations

Alternative Solutions

_No response_

Priority

Low - Nice to have

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

14 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16086
  2. https://github.com/anthropics/claude-code/issues/10215
  3. https://github.com/anthropics/claude-code/issues/7002

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

yulonglin · 7 months ago

While this is a duplicate, the others were wrongly closed, so let's leave this open

arslanbekov · 7 months ago

+1 for the don't override cursor at all approach

I use ghostty terminal (macos) with cursor-style = underline and shell-integration-features = no-cursor,
But CC still overrides my cursor to a block via DECSCUSR escape sequences.

This respects the Unix philosophy of not overriding the user's terminal preferences.

LangeMoritz · 6 months ago

+1

TorinoSM · 5 months ago

This would be a highly beneficial feature.
The conventional appearance of the terminal is a significant factor in a programmer's efficient work.
Many developers are accustomed to seeing not a block, but, for instance, a vertical bar.

lrpineda · 4 months ago

I really want the ability to set my own cursor thanks

ynatz · 4 months ago

With multibyte characters such as Japanese, the block cursor obscures the character it sits on, making it hard to read. My terminal is set to a bar cursor for this reason, but Claude Code forces a block cursor with no option to change it, which degrades the UX.

starquake · 3 months ago

I found another annoying side effect of this. Normally I can see if the terminal has focus or not by looking at the cursor. But Claude Code always shows the cursor even if the terminal does not have focus. Quite annoying.

knu · 3 months ago

This is the behavior of the underlying CUI library (ink) at work, so there is probably little claude-code can do about it.

Meanwhile, I wrote a small general-purpose terminal filter that can strip the fake cursor ink emits.
https://github.com/knu/tfil

gati3478 · 3 months ago

+1 on Kitty / macOS. cursor_shape underline in kitty.conf is ignored — Claude Code 2.1.142 hides the real cursor and renders an inline reverse-video block via Ink. No DECSCUSR shape (\e[3 q / \e[4 q) reaches the emulator, so Kitty has nothing to draw. Fullscreen vs non-fullscreen makes no difference. Want the terminal's native underline caret, same as every other TUI on the system.

gati3478 · 3 months ago

For context — the upstream fix path is on Ink itself: vadimdemedes/ink#251 (open since 2019) → PR vadimdemedes/ink#872 (open, declarative <Cursor /> component, merge-conflicts, ~5 weeks stale).

Even once #872 lands, Claude Code's input box would still need to swap the chalk.inverse fake cursor for <Cursor />. Because <Cursor /> can't render inline within <Text>, that's a real refactor — and for proper inline-text positioning it likely also needs the CURSOR_MARKER mechanism Google's Gemini CLI uses (they shipped it via a fork of Ink).

IAmPEWTER · 3 months ago

+1 — please respect the terminal's cursor config (color and shape) instead of overriding it.

Gattocrucco · 3 months ago

+1, and: I'd like to customize separately the cursor in vim insert/normal mode.

mrsombre · 1 month ago

Adding a macOS/Ghostty data point plus a working opt-out that already exists today, in case it helps others who land here while this is still open.

TL;DR

CLAUDE_CODE_ACCESSIBILITY=1 restores the native terminal cursor and makes the terminal's own cursor-style apply inside the prompt input. It's documented, but it's discoverable only if you already suspect accessibility — nothing about the name suggests "cursor shape", so most people hunting this problem will never find it.

// ~/.claude/settings.json
{ "env": { "CLAUDE_CODE_ACCESSIBILITY": "1" } }

Verified on Claude Code 2.1.212, Ghostty 1.3.1 (cursor-style = bar), macOS 26.5.2, installed via homebrew cask claude-code@latest. Thin bar cursor is back, and it survives restarts.

Why this is worth a config key anyway

The env var works, but it's a side door: it flips the renderer into full accessibility mode (screen-reader render paths, cursor parking) as a package deal. Users who just want a bar cursor shouldn't have to opt into screen-reader behavior to get it. A dedicated cursorShape setting (as proposed here) or simply honoring DECSCUSR would be the honest fix.

Mechanism

From the minified 2.1.212 bundle — best-effort reading, symbol names are mangled:

function Iwe(){                                   // -> passed to the renderer as { nativeCursor: Iwe() }
  if (ye.CLAUDE_CODE_ACCESSIBILITY) return true;  // short-circuits everything below
  if (TL()) return true;                          // screen reader enabled
  return !x5e() && _Vi();
}

function _Vi(){
  if (ye.CLAUDE_CODE_ACCESSIBILITY) return true;
  if (TL()) return true;
  if (ut(process.env.CLAUDE_CODE_NATIVE_CURSOR)) return true;
  return et("tengu_native_cursor", false);        // server-side feature gate
}

nativeCursor: false is what makes Claude Code draw its own inverse-video block and hide the real terminal cursor. CLAUDE_CODE_ACCESSIBILITY is the first line of Iwe(), so it overrides the gate, tui mode, and everything else.

Note CLAUDE_CODE_NATIVE_CURSOR only ever forces the value on — there's no env var to force it off, and no way to influence it from settings.json.

Things that do NOT work (so nobody repeats them)

  • Editing cachedGrowthBookFeatures.tengu_native_cursor in ~/.claude.json — it's a cache of a server-side gate and gets overwritten. I set it to false, restarted, and it was back to true on the next launch. (This is step 1 of the workaround in #69591; it did not hold here.)
  • CLAUDE_CODE_DECSTBM=1 — reading the code, this forces x5e() true, which makes Iwe() false. That disables the native cursor, i.e. it's the wrong direction and would lock the block cursor in.
  • Terminal-side config — Ghostty's cursor-style = bar is correct and honored at the shell prompt; it simply doesn't reach the input because Claude Code isn't using the terminal cursor at all.

Related

#71371 (closed as duplicate of this one) describes the exact rendering behavior: "the prompt input renders the text cursor as a solid inverse-video block over the character at the caret position... Claude Code draws it directly, so the terminal's native cursor-shape setting doesn't apply." Also #69591, #61970, #16086, #10215.