Windows Terminal: Claude Code shows block cursor despite `cursorShape = "bar"`
[!NOTE] Update (2026-07-17): Current Claude Code documentation provides a stable, cursor-specific environment variable: ``json { "env": { "CLAUDE_CODE_NATIVE_CURSOR": "1" } }`CLAUDE_CODE_NATIVE_CURSOR=1displays the terminal's own cursor at the input caret and respects the terminal's blink, shape, and focus settings. This supersedes the historicalcachedGrowthBookFeatures.tengu_native_cursorworkaround below.cachedGrowthBookFeatures` is a server-managed cache and should not be treated as user configuration. The historical composite workaround did produce a thin cursor on three Windows devices, but because it changed several values together, it did not isolate the causal variable. The original report is retained below as a record of the observation. Documentation: https://code.claude.com/docs/en/env-vars
Summary
On Windows Terminal, Claude Code appears to draw or override its own input cursor. Even when Windows Terminal is configured with cursorShape = "bar" and the normal PowerShell prompt correctly shows a bar cursor, the Claude Code input area still shows a block cursor.
I found a local workaround by comparing another machine's Claude Code configuration:
- Enable
cachedGrowthBookFeatures.tengu_native_cursor = truein~/.claude.json. - Remove explicit UI/input-mode overrides such as
editorMode,tui,theme, andshowTurnDurationfrom~/.claude/settings.json. - Fully close all
claude.exeprocesses and restart Claude Code.
After those changes, Claude Code uses the expected thin native terminal cursor.
Environment
- OS: Windows 11 / Windows NT
10.0.22631.0 - Terminal: Windows Terminal
1.24.11321.0 - Shell: PowerShell in Windows Terminal
- Claude Code:
2.1.183 - Node.js:
v24.17.0
Steps to reproduce
- In Windows Terminal settings, set the default profile cursor shape to a bar:
``json``
{
"profiles": {
"defaults": {
"cursorShape": "bar"
}
}
}
- Open PowerShell in Windows Terminal.
- Confirm the normal PowerShell prompt uses a bar cursor.
- Start Claude Code with
claude. - Focus the Claude Code input prompt.
Expected behavior
Claude Code should either:
- preserve the terminal's configured cursor shape, or
- provide a documented setting/environment variable for choosing the native terminal cursor instead of the block/inverted-text cursor.
Actual behavior
The Claude Code input prompt shows a block cursor even though the terminal profile is configured to use a bar cursor.
Changing the Windows Terminal cursor setting affects normal PowerShell, but it does not affect Claude Code's prompt cursor.
Workaround that fixed it locally
The following change in ~/.claude.json fixed the cursor shape after restarting Claude Code:
{
"cachedGrowthBookFeatures": {
"tengu_native_cursor": true
},
"showSpinnerTree": false
}
I also removed these explicit keys from ~/.claude/settings.json so Claude Code could fall back to its default UI behavior:
editorMode
tui
theme
showTurnDuration
I am not suggesting users should rely on cachedGrowthBookFeatures as a stable public API. I am including it because it strongly suggests that the native cursor path already exists and works, but there does not appear to be a documented user-facing setting for this behavior.
Request
Could Claude Code expose a stable documented option for native terminal cursor behavior on Windows Terminal?
For example:
- a documented setting in
~/.claude/settings.json, or - a dedicated environment variable for native cursor behavior, separate from broader accessibility mode.
If CLAUDE_CODE_ACCESSIBILITY=1 is the intended supported workaround, it would be helpful to document that specifically for cursor behavior and clarify any UI tradeoffs.
Showing cached comments. Read the full discussion on GitHub ↗
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Thanks for the duplicate detection. This is related to #20878, #53619, and #30082, but I think this issue adds a specific implementation detail/workaround that is not captured there.
The new finding is that on Claude Code
2.1.183with Windows Terminal, setting:in
~/.claude.json, together with removing explicit UI/input-mode overrides from~/.claude/settings.json, made Claude Code use the native terminal cursor successfully.So this is not just another request for configurable cursor style. It suggests the native cursor path already exists behind an internal GrowthBook flag and works in practice. The request is to expose/document that path as a stable setting or environment variable, or clarify whether
CLAUDE_CODE_ACCESSIBILITY=1is the supported public workaround and what UI tradeoffs it has.#20878 can still be the umbrella tracking issue, but I think this issue is useful to keep because it documents a working native-cursor path on current Claude Code.
The original comment documented an experimental composite workaround. It edited
cachedGrowthBookFeatures.tengu_native_cursor, which is a server-managed feature-gate cache rather than a supported configuration surface, and it removed several settings whose relationship to cursor rendering was not isolated.The pasted version also lost path separators such as the one in
.claude\settings.json, so it should not be copied or executed.Current Claude Code documentation provides a stable, cursor-specific option. Add this to the existing
envobject in~/.claude/settings.json:Then fully close all Claude Code processes and restart. This uses the terminal's native cursor and respects its blink, shape, and focus settings. It does not require editing
~/.claude.json, removingeditorMode/tui/theme/showTurnDuration, changingshowSpinnerTree, or touching MCP/plugin settings.Documentation: https://code.claude.com/docs/en/env-vars
For historical context, the earlier composite operation produced a thin cursor on three Windows devices, but that observation did not establish which individual change caused it. The old script is therefore retained only in GitHub's edit history, not as a recommended workaround.
Same symptom on macOS + Ghostty, so this isn't
platform:windows— the label probably undersells it. More usefully: step 1 of your workaround doesn't hold here, and I think I found why, plus a lever that does work.tengu_native_cursorcan't be pinned from~/.claude.jsoncachedGrowthBookFeaturesis a cache of a server-side gate, not a setting. I settengu_native_cursor = false, fully quit everyclaudeprocess, restarted — and it was back totrueon the next launch, written by Claude Code itself. Editing it in the other direction will be just as unstable; if it worked on your machine, I'd guess the gate simply already evaluated that way for your account rather than your edit being what stuck.Worth checking on your side: does your edit still hold after a few days, or did the gate just happen to agree with it?
What actually works
Thin native cursor is back, survives restarts, and doesn't depend on the gate or on removing any of your settings. From the minified 2.1.212 bundle (best-effort read, mangled symbols):
Because
CLAUDE_CODE_ACCESSIBILITYshort-circuitsIwe()before the gate is consulted, it's stable in a way the cache edit can't be.On removing
editorMode/tui/theme/showTurnDurationI couldn't reproduce this part as a cause. I had
tui: fullscreenset in both of my installs (andtheme+editorModein one), andCLAUDE_CODE_ACCESSIBILITY=1gives a thin cursor with all of them still in place. I can't see a mechanism by whichthemewould reach cursor rendering, and the code path above doesn't consult any of these. Possible those removals were incidental to whatever fixed it for you.Environment
claude-code@latest)cursor-style = bar,TERM=xterm-ghosttyCross-referencing #20878 (canonical) where I've posted the full findings.
@mrsombre, thanks — this is a very useful cross-platform data point and code-path analysis. I agree with the main conclusion:
cachedGrowthBookFeaturesis not a stable configuration surface, and my original composite workaround did not isolate the causal variable.One clarification on the Windows evidence: this was not based only on the first machine where the thin cursor appeared unexpectedly. I then applied the same composite workaround on a new Windows desktop and got the thin native cursor, and a classmate followed the same Chinese guide on a third Windows laptop with the same result. All three devices were Windows. That is why I initially attributed the result to the configuration differences. It remains a real three-device empirical reproduction, but I agree that it does not prove which individual edit was responsible. Your
false -> restart -> truetest demonstrates that the GrowthBook value can be rewritten; it does not strictly rule out a transient effect from writingtruein the older 2.1.183 Windows build, but it does show why the cache must not be recommended as a setting.There is also a more targeted supported lever in the current documentation:
The docs say this displays the terminal's own cursor and respects its blink, shape, and focus settings: https://code.claude.com/docs/en/env-vars
That is preferable here to both editing the GrowthBook cache and enabling the broader accessibility mode. It can be set under
envin~/.claude/settings.json, so the UI settings can remain unchanged.I've updated the issue and replaced my old script comment with a superseded notice, including a correction for the path separators that were lost in the pasted GitHub version. I've also revised the Chinese guide to use
CLAUDE_CODE_NATIVE_CURSOR=1and kept the three-Windows-device result only as historical context.Thanks again for tracing the 2.1.212 path and cross-referencing the canonical issue.