[BUG] Interactive TUI frozen + 90%+ CPU on Linux via SSH — input never accepted, claude -p works fine
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment
Claude Code version: 2.1.31
Node.js: v22.22.0 (also reproduced on v22.21.1)
OS: AlmaLinux (CentOS/RHEL-based), x86_64
Connection: SSH from Windows to Linux server
Terminal: Tested with VS Code Remote SSH, SolarPutty, and Windows Terminal native ssh — same result on all three
TERM: xterm-256color
LANG: nl_NL.utf8
Shell: bash
Bug Description
The interactive TUI renders the welcome screen correctly but never accepts keyboard input. The Claude process immediately spins to 89–98% CPU on a single core. In some cases the TUI sits frozen with no keystrokes registering; in other cases it automatically submits an empty/undefined prompt, receives a "Hi! How can I help you today?" response, and exits on its own.
This was working correctly 2 days prior on the same server with the same setup. No known configuration changes were made.
What Should Happen?
Expected Behavior
The input field should accept keyboard input and allow interactive conversation.
Actual Behavior
Two observed behaviors (varies between attempts):
Frozen input: Welcome screen shows, cursor visible, but no keystrokes register. Process uses ~90% CPU.
Auto-submit and exit: Claude immediately submits an empty prompt (query: undefined in debug log), gets a response, and exits back to shell.
Error Messages/Logs
What Works
claude --version → responds correctly
claude -p "test" → works fine, returns a response
cat and other interactive terminal programs work normally in the same SSH session
Authentication and API communication work (confirmed via debug logs)
Debug Log Evidence
The debug log (~/.claude/debug/latest) shows Claude submitting a prompt without waiting for user input:
UserPromptSubmit with query: undefined
...
Stream started - received first chunk
...
Stop with query: undefined
SessionEnd with query: other
Steps to Reproduce
Steps to Reproduce
SSH into a Linux server (AlmaLinux) from any SSH client
Run claude (from any directory)
Welcome screen renders, input field appears
Attempt to type — nothing happens, or Claude auto-submits an empty prompt and exits
Claude Model
None
Is this a regression?
I don't know
Last Working Version
Claude Code version: 2.1.31
Claude Code Version
Claude Code version: 2.1.31
Platform
Other
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Troubleshooting Already Attempted
Three different SSH clients (VS Code Remote SSH, SolarPutty, Windows Terminal ssh)
TERM=xterm-256color explicitly set
stty sane before launching
Launching from home dir and from project directories
Clean environment with env -i
Fresh Node.js install (v22.22.0) + fresh npm install -g @anthropic-ai/claude-code
Killed all zombie Claude processes between attempts
No .inputrc, no BASH_ENV, no Claude/Anthropic environment variables set
No NFS mounts — local filesystem, 12 GB RAM available, server not under load
Related Issues
#7171 — Same symptoms on Windows (frozen interactive mode, -p works)
#9929 — Same symptoms on Windows 11 (frozen, raw mode issue)
#11339 — 100% CPU in interactive mode on macOS
#18532 — 100% CPU freeze, infinite loop on macOS
#17787 — TUI input broken due to cursor position response leak
This appears to be the same underlying TUI/Ink input handling bug, but on Linux via SSH rather than native Windows or macOS.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗