[BUG] Interactive TUI exits immediately with stdin EOF since ~v2.1.30 (works in v2.1.25)
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?
Claude Code's interactive TUI launches, renders the welcome screen successfully, but immediately exits without accepting any input. The process terminates cleanly (exit code 0) rather than crashing.
What Should Happen?
Pipe mode works fine
echo "hello" | claude -p "say hi"
# → "Hello! How can I help you today?" — works correctly
This confirms API connectivity, authentication, and the Node.js runtime are all functional. The issue is isolated to the interactive TUI's stdin handling.
Debug log observations
From claude --debug, the last significant entries before exit:
[DEBUG] Watching for changes in setting files /home/Username/.claude...
[DEBUG] High write ratio: blit=0, write=1189 (100.0% writes), screen=...
The blit=0, write=1189 (100.0% writes) line appears twice, indicating the Ink renderer is doing full redraws with no differential updates, though this may be unrelated.
Error Messages/Logs
### strace analysis
The TUI exits because `read(0, ...)` returns 0 (EOF) on stdin:
410756 read(0, "", 24576) = 0
410757 read(0, "", 20480) = 0
The process then performs a clean shutdown, restoring terminal settings via `ioctl(TCSETS)` with `icanon echo` and calling `exit_group(0)`.
This suggests a regression in how the TUI sets up or reads from stdin in raw mode. The same terminal/pty/SSH configuration works perfectly with v2.1.25.
Steps to Reproduce
Steps to Reproduce
- SSH into a Linux server from any SSH client
- Run
claude(native installer, v2.1.30+) - TUI renders (logo, welcome message, prompt all visible)
- Process immediately exits back to shell — no input accepted
Environment
- OS: Linux (HPC server environment)
- Filesystem: Lustre (home directory), tested also from local
/tmp— same result - Terminal:
TERM=xterm-256color, terminal size 48×166 - TTY:
/dev/pts/64(proper pty allocated) - SSH clients tested: Windows PowerShell OpenSSH, MobaXterm — same behavior on both
- tmux: Not used (also tested without tmux, same result)
- Installation: Native installer
- Claude Code version: v2.1.37 (broken), v2.1.25 (working)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.25
Claude Code Version
2.1.37
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗