If you’re running Claude Code on a cPanel VPS with AlmaLinux 8 (or similar RHEL-based distro) over SSH and experiencing the TUI appearing briefly then immediately dropping back to shell, here’s what I found after extensive troubleshooting. Symptoms
- Claude welcome screen renders and your account name is visible (auth is fine)
- No input is accepted — keystrokes go to the shell beneath the TUI
- Exit code is 0 (clean exit, no crash)
- Error log is empty
claude --debugoutputs:Error: Input must be provided either through stdin or as a prompt argument when using --print- TTY checks pass: both stdin and stdout are TTYs
- No aliases, wrappers, or environment variables interfering What I ruled out
- Authentication issues (account name visible, OAuth working)
- TTY problems (htop and other TUI apps work fine)
- Shell config / aliases / environment variables
- SSH client (Core Shell on Mac)
- cPanel profile.d scripts
- Terminal size or TERM variable Root cause The native Claude Code binary has a TTY/stdin acquisition issue on AlmaLinux 8 / RHEL 8 environments. The TUI renders but never acquires stdin, exiting cleanly with code 0. This appears to be a known issue on certain Linux distros (there are similar reports on GitHub for RHEL8: issue #12084). The MCP auto-fetch from claude.ai (Gmail, Google Calendar connectors) also causes authentication errors on headless servers, which may compound the exit behavior. Fix Use the npm version instead of the native installer:
npm install -g
u/anthropic-ai/claude-code
The npm version runs through Node.js and handles TTY correctly in this environment. It’s the same Claude Code, just distributed differently. Environment
- AlmaLinux 8, cPanel/WHM server
- SSH session (no tmux/screen)
- Claude Code native v2.1.71 Hope this saves someone a few hours of debugging! submitted by /u/michaeltravan
Originally posted by u/michaeltravan on r/ClaudeCode
You must log in or # to comment.
