[BUG] Native binary REPL immediately exits on Rocky Linux 8 (EUC-KR server)

Resolved 💬 3 comments Opened Feb 9, 2026 by littlecold2 Closed Feb 12, 2026

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 native binary REPL immediately exits after rendering the welcome screen. The TUI displays normally but exits to shell within ~1 second without any user input. No error messages are shown. strace reveals stdin returns EOF (read(0, "", 24576) = 0) immediately after REPL mount.

Setup screens (theme selection, login, trust folder) work fine interactively. Only the main REPL input prompt exits immediately. --print mode also works correctly.

What Should Happen?

Claude Code should remain running at the REPL prompt (❯) and wait for user input.

Error Messages/Logs

No error messages displayed. Debug log (~/.claude/debug/latest) shows no errors:

2026-02-09T05:47:24.306Z [DEBUG] [REPL:mount] REPL mounted, disabled=false
2026-02-09T05:47:24.306Z [DEBUG] [render] first ink render: 1458ms since process start
2026-02-09T05:47:24.306Z [DEBUG] Loaded plugins - Enabled: 0, Disabled: 0, Commands: 0, Agents: 0, Errors: 0

strace shows stdin EOF:
$ strace -f -e trace=read -o /tmp/claude_read.log claude
$ grep 'read(0, ""' /tmp/claude_read.log
3398970 read(0, "", 24576) = 0
3398971 read(0, "", 32768) = 0

Process exits with code 0.

Steps to Reproduce

  1. Use a Rocky Linux 8 server with default locale ko_KR.eucKR
  2. Install Claude Code native binary: curl -fsSL https://claude.ai/install.sh | sh
  3. Run: claude
  4. Observe: Welcome screen renders, REPL prompt appears, then immediately exits to shell

Also tested with:

  • export LANG=en_US.utf8 LC_ALL=en_US.utf8 → same result
  • TERM=xterm-256color → same result
  • TERM=dumb → same result
  • Inside tmux → same result (no "uu" ghost input, but still exits)
  • Inside screen → same result
  • SSH from Windows cmd → same result
  • SecureCRT SSH client → same result (with extra "uu" ghost characters from kitty keyboard query)

Working: echo "hello" | claude --print → responds correctly
Working: Setup screens (theme, login, trust) work interactively

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.37

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Xterm

Additional Information

The native binary appears to send a kitty keyboard protocol query escape sequence
on startup. On EUC-KR terminals, the terminal cannot interpret this and echoes back
"u" or "uu" characters to stdin, which may be interpreted as a quit command.

However, even after switching locale to en_US.utf8 and running inside tmux
(where "uu" ghost input disappears), the REPL still exits immediately with
stdin EOF. This suggests there may be two separate issues:

  1. Kitty keyboard query incompatibility with EUC-KR terminals (causes "uu" echo)
  2. Native binary stdin handling bug on Rocky Linux 8 / glibc 2.28 environment

Node.js raw mode test works fine:
$ node -e "process.stdin.setRawMode(true); console.log('OK'); setTimeout(() => { process.stdin.setRawMode(false); process.exit(0); }, 2000);"
→ "OK" printed, waits 2 seconds, exits normally

System Node.js: v10.24.0 (not used by native binary)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗