[BUG] - Native installation v2.1.15 interactive mode exits immediately on WSL (Ubuntu 20.04)

Resolved 💬 11 comments Opened Jan 22, 2026 by jloguercio Closed May 23, 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?

After migrating from npm to native installation on WSL, the interactive mode (TUI) renders the welcome screen but immediately exits with code 0. The non-interactive mode (-p flag) works correctly.

What Should Happen?

When running claude in interactive mode, the TUI (Terminal User Interface) should remain open and wait for user input. The user should be able to type prompts, interact with the interface, and the session should only end when the user explicitly exits (using /exit, Ctrl+C, or similar).
The interactive mode should behave the same as it does with the npm installation, which works correctly on the same WSL environment.

Error Messages/Logs

Steps to Reproduce

Install Claude Code using native installer: curl -fsSL https://claude.ai/install.sh | sh
Run claude in any directory
The welcome screen appears briefly then exits immediately back to shell prompt

Expected behavior:
Interactive mode should remain open and wait for user input.
Actual behavior:
The TUI renders completely (welcome banner, prompt, tips) but exits immediately with code 0.
Diagnostic findings:

Non-interactive mode works fine:

bash$ claude -p "hello, respond only 'works'"
works


2. `strace` output shows clean exit with no errors:

15201 exit_group(0)
15201 +++ exited with 0 +++

TTY detection is correct:

bash$ [ -t 0 ] && echo "stdin is TTY" || echo "stdin is NOT TTY"
stdin is TTY
$ [ -t 1 ] && echo "stdout is TTY" || echo "stdout is NOT TTY"
stdout is TTY

No aliases or shell configurations interfering:

bash$ type claude
claude is hashed (/home/user/.local/bin/claude)
$ alias claude 2>/dev/null
(empty)
$ grep -r "claude" ~/.bashrc ~/.zshrc ~/.profile ~/.inputrc 2>/dev/null
(empty)

Resetting configuration (~/.claude.json) did not help.
Tested with clean environment - same issue:

bash$ env -i HOME="$HOME" PATH="/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin" TERM=xterm-256color claude

Still exits immediately

Workaround:
Reverting to npm installation resolves the issue:
bashrm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
npm install -g @anthropic-ai/claude-code
The npm version (2.1.15) works correctly in interactive mode on the same WSL environment.
Additional context:

Previously had both npm and native installations simultaneously (removed npm version before testing)
claude doctor showed correct native installation after migration
No error logs found in ~/.claude/logs/ or ~/.local/share/claude/logs/

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.15

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Environment:

OS: WSL 1 / Ubuntu 20.04 on Windows
Claude Code version: 2.1.15 (native)
Terminal: Windows Terminal, Ubuntu WSL terminal, PhpStorm terminal (all affected)
Shell: bash
Terminal size: 30 rows × 120 columns

View original on GitHub ↗

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