claude doctor command freezes with no response to Enter key
Status Fixed / completed
Maintainer reply ✓ Yes — blois
Activity 12 comments · opened Jan 23, 2026 · closed Mar 5, 2026
💡 Likely answer: A maintainer (blois, collaborator)
responded on this thread — see the highlighted reply below.
Description
The claude doctor command hangs and becomes unresponsive. Pressing Enter does not produce any response or output.
Environment
- OS: macOS (Darwin 25.2.0)
- Terminals tested: Both iTerm2 and Ghostty exhibit the same behavior
- Date: 2026-01-23
Steps to Reproduce
- Run
claude doctor - The command appears to freeze/hang
- Pressing Enter key produces no response
- The terminal remains stuck
Expected Behavior
The claude doctor command should execute and display diagnostic information, or at least respond to user input.
Actual Behavior
The command freezes completely with no output or response to keyboard input (Enter key).
Additional Context
This issue occurs consistently across different terminal emulators (iTerm2 and Ghostty), suggesting it's not terminal-specific.
Possible Investigation Areas
- Is the command waiting for input that wasn't prompted?
- Could there be a blocking I/O operation?
- Any network calls that might be timing out?
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I see the same issue:
The other issues linked above are all closed. Claude's diagnosis:
Also affects
claude -r(resume) - see #20374 for additional reproduction scenario:When running
claude -rin a directory with no previous conversations, the prompt "Press Ctrl+C to exit and start a new conversation" also freezes with the same symptoms (keyboard input ignored, must forcibly kill process).Tested in both Warp and Mac Terminal - same behavior in both.
Same root cause (terminal raw mode) likely applies to both entry points.
I actually need to
kill -9itkilldoesn't stop itOccurs under Linux as well. Ubuntu 24.04.3 LTS, gnome-terminal.
This issue is also occurring on Windows since claude code version 2.1.16
Same issue here on macOS 15.x and 26.x.
Additional Investigation Findings for Issue #20303
These findings may help narrow down the root cause of the
claude doctorinput hang.1. Minimal Ink Test Works Correctly
I created a standalone Ink app with
useInputand confirmed it correctly receives and processes Enter keypresses when run via Bun:Conclusion: The bug is not in Bun or Ink core libraries - it's specific to how
claude doctor's pagination component sets up input handling.2. Unusual Multiple TTY File Descriptors
The doctor process has 6 file descriptors pointing to the same TTY:
The separate read-only FD 14 is unusual. This might indicate:
3. Screen Updates But No Input Processing
When sending Enter via PTY (using expect or Python pty module), the screen does update after input is sent:
This suggests:
4. Version 2.1.19 Also Affected
The issue currently mentions versions 2.1.16 and 2.1.17. Confirmed that 2.1.19 (latest) is also affected.
5.
claude -pWorks FineRunning
claude -p "test"works correctly and processes input/output properly. This confirms the main stdin handling in Claude Code works - the bug is isolated to the interactive pagination component used bydoctorandresumecommands.6. Stack Sample Confirms kevent64 Wait
Process sample shows main thread blocked in:
This is the correct system call for waiting on I/O events - the process is properly waiting, but the stdin read events aren't being dispatched to the Ink input handler.
---
Suggested Investigation: Check how the pagination/prompt component registers stdin for reading in the event loop. The multiple TTY FDs and the fact that minimal Ink works suggests the pagination component may be:
stdin.resume()or equivalent callAlso experiencing this issue on WSL2 environment:
Same symptoms -
claude doctordisplays diagnostics correctly but "Press Enter to continue…" prompt doesn't respond to Enter key. Only way to exit isCtrl+C.On Windows 11, this appears to be resolved as of claude code 2.1.21
Fixed on Mac in 2.1.29.
Yes, this should have been fixed in
2.1.21.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.