[BUG] Claude Code v2.1.17 exits immediately on WSL1 - regression from working state

Resolved 💬 8 comments Opened Jan 23, 2026 by flipm0de Closed Mar 11, 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 launches, displays the TUI for approximately 1-2 seconds, then exits cleanly without any error message. This is a regression - it was working perfectly on the same WSL1 setup 2-3 days ago.

What Should Happen?

Claude Code should remain open in interactive TUI mode, waiting for user input, as it did before the recent updates.

Error Messages/Logs

The debug log shows a clean exit with no errors. Key observations:

- All startup steps complete successfully
- `[REPL:mount] REPL mounted, disabled=false` appears
- Then shortly after: `Released PID lock for 2.1.17`
- No crash, no error - just a graceful exit

Full debug log excerpt (end of log):

2026-01-23T12:34:33.224Z [DEBUG] [REPL:mount] REPL mounted, disabled=false
2026-01-23T12:34:33.482Z [DEBUG] AutoUpdaterWrapper: Installation type: native
...
2026-01-23T12:34:34.158Z [DEBUG] File /home/user/.claude.json written atomically
2026-01-23T12:34:34.206Z [DEBUG] Released PID lock for 2.1.17

Steps to Reproduce

  1. Have WSL1 (not WSL2) installed on Windows 11
  2. Install Claude Code via native installer: curl -fsSL https://claude.ai/install.sh | bash
  3. Run claude or claude --debug
  4. Observe: TUI appears briefly, then exits immediately
  5. Try stable version: curl -fsSL https://claude.ai/install.sh | bash -s 2.1.7
  6. Run claude again - same immediate exit behavior

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.17

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Tested versions:

  • v2.1.17 (latest) - exits immediately
  • v2.1.7 (stable, via curl -fsSL https://claude.ai/install.sh | bash -s 2.1.7) - same behavior, exits immediately

Non-interactive mode works fine (echo "hello" | claude --print returns a response), so API connectivity is not the issue. Only the interactive TUI mode fails.

Environment

  • Claude Code version: Tested both 2.1.17 and 2.1.7 (native install)
  • OS: Windows 11 with WSL1 (Ubuntu)
  • WSL Version: 1 (cannot upgrade to WSL2 due to VirtualBox dependency)
  • Node.js: v22.17.0 (via NVM, Linux paths)
  • npm: 11.4.2
  • Terminal: PowerShell → WSL, also tried Windows Terminal → WSL

Additional Findings

  1. Missing skills directory caused an error (but not the crash):
   [ERROR] Error: ENOENT: no such file or directory, scandir '/etc/claude-code/.claude/skills'

Creating this directory (sudo mkdir -p /etc/claude-code/.claude/skills) resolved the error but did not fix the immediate exit.

  1. Non-interactive mode works: echo "hello" | claude --print works correctly.
  1. TTY is detected: tty returns /dev/tty1
  1. Tested from multiple paths: Fails from both /mnt/c/... (Windows filesystem) and ~ (Linux home).
  1. WSL1 kernel version: Linux version 4.4.0-26100-Microsoft

Workaround Attempts

  • Factory reset (rm -rf ~/.claude ~/.claude.json ~/.local/share/claude ~/.local/state/claude)
  • Reinstalling Claude Code
  • Downgrading to stable v2.1.7 - same issue
  • Creating missing /etc/claude-code/.claude/skills directory
  • Running with script -q /dev/null -c "claude"
  • Running from different directories
  • Trying different terminals (PowerShell, Windows Terminal)

None of these resolved the issue.

Suspected Cause

WSL1 has limited PTY (pseudo-terminal) support compared to WSL2. A recent change in Claude Code's terminal handling may have broken compatibility with WSL1's PTY implementation. The fact that both v2.1.17 and v2.1.7 exhibit the same behavior suggests the issue may be related to the native binary build rather than a specific version's code changes.

Impact

Users who cannot upgrade to WSL2 (e.g., due to VirtualBox/Hyper-V conflicts) are unable to use Claude Code in interactive mode.

View original on GitHub ↗

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