[Bug] Input cursor blinks irregularly in `claude attach` sessions due to screen repaint rate
Bug Description
Title: Input cursor blinks fast and irregularly in claude attach clients (2.1.283, Windows Terminal)
Environment
- Claude Code 2.1.283 (Windows 11, Windows Terminal, PowerShell 5.1 host)
- Background session started with
claude --bg, viewed throughclaude attach <id> - The background session runs several subagents in parallel (their status lines in the footer update every few seconds)
What happens
In the attached client the input-box cursor blinks noticeably faster than in a normal interactive session and the rhythm is irregular. By eye it is about 1.5 to 2 times the blink count of a regular session in the same terminal. A regular session (claude or claude --resume) in the same Windows Terminal blinks normally.
When the tab loses focus:
- a regular session's cursor stops as a steady bar (the terminal's native cursor behaviour)
- the attached client's cursor keeps blinking at a regular ~1 s interval
What I ruled out
- Launching the attach client from my own shell profile instead of a spawned tab: no change.
CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1on the attach client: no change.CLAUDE_CODE_NO_FLICKER=1on the attach client: no change.- Turning the Windows cursor blink rate to "none" (Keyboard Properties): a fresh PowerShell window shows a fixed bar as expected, but the attached client still blinks fast and irregularly. So the extra blinking does not come from the terminal's native cursor.
What it looks like
The attach client seems to hide and show the cursor around every screen repaint, so the blink rate follows the repaint rate (subagent status updates, spinner) rather than a fixed timer. The more background activity, the faster and less regular the cursor.
Expected
The attached client's input cursor should blink at the same rate as a regular session, or follow the terminal's cursor setting.
Steps to reproduce
claude --bgin a project, thenclaude attach <id>in a Windows Terminal tab.- Start a few background subagents (or any long task that keeps the footer updating).
- Watch the input cursor; compare with a plain
claudesession in another tab. - Optional: set the Windows cursor blink rate to "none" and note that the attached client still blinks.
Environment Info
- Platform: win32
- Terminal: xterm-256color
- Version: 2.1.283
- Feedback ID: a145172e-2ac9-43c0-b95e-848edd7ec5d5
Errors
[]