[BUG] Windows Terminal input completely frozen starting from v2.1.30 (regression from v2.1.29)

Status Fixed / completed
Reported on v2.1.30
Maintainer reply None cached
Activity 13 comments · opened Feb 4, 2026 · closed Feb 16, 2026

Bug Description

Claude Code becomes completely unresponsive to keyboard input on Windows Terminal starting from v2.1.30. The screen appears frozen — no characters can be typed, and the input prompt is non-functional. Downgrading to v2.1.29 immediately resolves the issue.

Environment

  • OS: Windows 11
  • Terminal: Windows Terminal (native, not WSL)
  • Shell: PowerShell / Git Bash (both affected)
  • Node.js: v20.11.0
  • Installation: npm (@anthropic-ai/claude-code)

Reproduction Steps

  1. Install Claude Code v2.1.30: npm install -g @anthropic-ai/claude-code@2.1.30
  2. Open Windows Terminal
  3. Run claude
  4. Attempt to type anything into the prompt
  5. Result: No input is accepted. Screen appears completely frozen.

Expected Behavior

The prompt should accept keyboard input normally (as it does in v2.1.29).

Root Cause Analysis

Binary diff analysis of the bundled cli.js between v2.1.29 and v2.1.30 reveals the following significant changes:

1. New useInterval hooks (0 → 5)

v2.1.29 had zero useInterval-based animation hooks. v2.1.30 introduces 5 new useInterval hooks running at 50ms–1000ms intervals:

| Hook | Interval | Purpose |
|------|----------|---------|
| Spinner position animation | 50ms / 200ms | Glimmer effect calculation |
| Stalled detection timer | 100ms | Tracks request duration |
| Stalled intensity interpolation | 50ms | Smooth animation easing |
| Team name animation | 1000ms | UI counter increment |
| Elapsed time tracker | 100ms | Duration display |

Each interval triggers a React state update → full Ink re-render → ANSI escape sequence generation → stdout write.

2. Rewritten spinner component

The spinner component was completely rewritten with new Box layout (flexWrap:"wrap", height:1, width:2), a reducedMotion parameter, and a reversed animation frame array — all adding layout computation overhead per render cycle.

3. Additional reactive state

| Metric | v2.1.29 | v2.1.30 | Diff |
|--------|---------|---------|------|
| useInterval hooks | 0 | 5 | +5 |
| useRef | 144 | 153 | +9 |
| useState | 542 | 545 | +3 |
| setTimeout | 302 | 308 | +6 |
| useMemo | 83 | 87 | +4 |
| spinner/animation refs | 182 | 204 | +22 |

Why this breaks on Windows Terminal

Ink (React for CLI) re-renders the entire screen buffer on every state change. On macOS/Linux terminals with Synchronized Output (DEC mode 2026), these rapid re-renders are batched and handled efficiently. However, Windows Terminal's ConPTY layer processes ANSI sequences significantly slower, causing:

  1. Rapid useInterval callbacks (50–100ms) trigger continuous React re-renders
  2. Each re-render writes ANSI sequences to stdout via ConPTY
  3. ConPTY cannot drain the output buffer fast enough
  4. stdout write() blocks the Node.js event loop
  5. Blocked event loop cannot process stdin (keyboard input)
  6. Result: Screen appears frozen, input is impossible

prefersReducedMotion does NOT fix this

v2.1.30 added a prefersReducedMotion config option. Testing confirmed it does not resolve the issue — it only changes the visual representation (blinking dot instead of animated spinner) but the underlying useInterval hooks continue firing at the same frequency.

Suggested Fix

  • Gate useInterval hooks behind a ConPTY/Windows detection check, or significantly increase their intervals on Windows (e.g., 500ms+ instead of 50ms)
  • Make prefersReducedMotion: true actually disable or throttle the interval hooks, not just change visuals
  • Consider using requestAnimationFrame or passive rendering instead of aggressive interval-based re-renders

Workaround

Downgrade to v2.1.29:

npm install -g @anthropic-ai/claude-code@2.1.29

Related Issues

  • #18084 — Severe screen flickering in VS Code/Cursor integrated terminal on Windows (same Ink re-rendering root cause)
  • #10736 — Windows Terminal Input Stream Loss After Command Execution
  • #19637 — Windows cmd rendering issue since v2.1.3

View original on GitHub ↗

13 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/22906
  2. https://github.com/anthropics/claude-code/issues/22970
  3. https://github.com/anthropics/claude-code/issues/22997

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

jltx · 6 months ago

I'm seeing this too. I can't start any new sessions because I can't type into any of them!

mimosel · 6 months ago

+1

codemile · 6 months ago

@gongpyung if you press the ENTER key when Claude first starts, then it will unfreeze the terminal and you can use 2.1.31

I'm still testing this workaround to see if it's stable. While it unfreezes the keyboard for inputs the ANSI animations still seem flaky, but I've been able to by-pass this bug so far. If you forget to hit ENTER, then you're out of luck and have to restart Claude.

codemile · 6 months ago

@gongpyung another workaround; if your terminal is already frozen, then selecting some text and pressing CTRL+V appears to unfreeze it.

gongpyung · 6 months ago
@gongpyung if you press the ENTER key when Claude first starts, then it will unfreeze the terminal and you can use 2.1.31 I'm still testing this workaround to see if it's stable. While it unfreezes the keyboard for inputs the ANSI animations still seem flaky, but I've been able to by-pass this bug so far. If you forget to hit ENTER, then you're out of luck and have to restart Claude.

Wow..this actually works perfectly! How did you figure this out? Super impressive 😄
I’ll be using your approach for a while. Thanks a lot!

codemile · 6 months ago

@gongpyung reading the comments in the duplicates and trying their fixes. Some of them worked and some didn't.

joshuawheelock · 6 months ago
> @gongpyung if you press the ENTER key when Claude first starts, then it will unfreeze the terminal and you can use 2.1.31 > I'm still testing this workaround to see if it's stable. While it unfreezes the keyboard for inputs the ANSI animations still seem flaky, but I've been able to by-pass this bug so far. If you forget to hit ENTER, then you're out of luck and have to restart Claude. Wow..this actually works perfectly! How did you figure this out? Super impressive 😄 I’ll be using your approach for a while. Thanks a lot!

It doesn't work perfectly, because if you have a SessionStart hook configured that gets bypassed and doesn't run.

Do you have a SessionStart hook configured?

I started experiencing the same thing. I have a SessionStart hook that runs a command which renders output to the terminal. I ran claude in --debug mode, and saw there was an error parsing the json output of the command.

Removing the hook configuration fixed claude. So, I started debugging the command (it's my cli tool that is configured to be called).

I wasn't getting anywhere. So I ran a test. I configured my hook to fire an echo command.

"SessionStart": [ { "matcher": "startup", "hooks": [ { "type": "command", "command": "echo {}" } ] } ]

I fired claude up again and it still froze.

In conclusion, this isn't a bug with my cli and I've confirmed its a bug with Claude Code and most definitely a bug with the SessionStart hook protocol.

gongpyung · 6 months ago
> > @gongpyung if you press the ENTER key when Claude first starts, then it will unfreeze the terminal and you can use 2.1.31 > > I'm still testing this workaround to see if it's stable. While it unfreezes the keyboard for inputs the ANSI animations still seem flaky, but I've been able to by-pass this bug so far. If you forget to hit ENTER, then you're out of luck and have to restart Claude. > > > Wow..this actually works perfectly! How did you figure this out? Super impressive 😄 I’ll be using your approach for a while. Thanks a lot! It doesn't work perfectly, because if you have a SessionStart hook configured that gets bypassed and doesn't run. Do you have a SessionStart hook configured? I started experiencing the same thing. I have a SessionStart hook that runs a command which renders output to the terminal. I ran claude in --debug mode, and saw there was an error parsing the json output of the command. Removing the hook configuration fixed claude. So, I started debugging the command (it's my cli tool that is configured to be called). I wasn't getting anywhere. So I ran a test. I configured my hook to fire an echo command. "SessionStart": [ { "matcher": "startup", "hooks": [ { "type": "command", "command": "echo {}" } ] } ] I fired claude up again and it still froze. In conclusion, this isn't a bug with my cli and I've confirmed its a bug with Claude Code and most definitely a bug with the SessionStart hook protocol.

After checking, I confirmed that I don’t have any SessionStart hooks configured myself. However, I did find that one of the installed plugins has a SessionStart hook registered. 😅

joshuawheelock · 6 months ago

~~Fixed as of 2.1.36~~

Scrap that. It was working, but then they released 2.1.37.

mimosel · 6 months ago

Not for me. Bug still exists.

mydandyandy · 6 months ago

+1 — Confirming this is still present in v2.1.37 on Windows 11 25H2

Environment:

  • Windows 11 25H2
  • Windows Terminal + PowerShell
  • Node.js v24.13.0
  • Claude Code v2.1.37

Behavior:

  • claude --resume renders the session picker UI correctly, but keyboard is completely frozen — no arrow keys, no typing in search box, no Ctrl+C. Must close the terminal window entirely.
  • claude --continue also freezes identically.
  • claude (fresh launch, no flags) works fine.
  • /resume slash command from inside a running session works fine.
  • Issue is intermittent — temporarily resolved itself once, then returned after using --continue and has not recovered since.

Workaround: Launch claude without flags, then use /resume from within the session. This uses a different code path and is not affected.

github-actions[bot] · 6 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.