Interactive session exits instantly with no output on Windows 11; print mode works

Status Fixed / completed
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 30, 2026 · closed Aug 1, 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?

Running claude starts an interactive session that exits within a fraction of a second, returning to the shell prompt with no error, no output and no exit message.

Print mode (claude -p "say hello") works and returns a normal response, so auth, network and the install are fine. Only the interactive session is affected.

The session does begin drawing its UI before dying: after each failed run the terminal is left with mouse-tracking, focus-tracking and bracketed-paste modes still enabled, leaking escape codes (^[[<35;56;19M, ^[[I, ^[[O, ^[[200~) into the shell. So terminal modes are set at startup and never restored, meaning the process terminates after UI init rather than failing to launch.

Behaviour is intermittent. Identical commands in identical fresh terminals succeed and fail minutes apart, which suggests a race condition rather than a configuration problem.

Ruled out during debugging: reinstall, duplicate installs (single path), VS Code shell integration, the Claude Code VS Code extension, MCP servers (none configured), plugins (none installed), hooks (none), ~/.claude/settings.json (renamed away, no change), and a full machine restart.

claude --safe-mode --no-chrome is the only combination that has started successfully more than once. --no-chrome alone worked once then failed three times. --safe-mode alone failed.

What Should Happen?

The interactive session should start and accept keyboard input.

Error Messages/Logs

None. This is the core difficulty: `claude doctor` also exits instantly, and redirecting it with `claude doctor > out.txt 2>&1` produces an empty file, so nothing is written to stdout or stderr. `claude --debug` produces no output either.

Steps to Reproduce

  1. Open cmd.exe on Windows 11
  2. cd into any project directory
  3. Run claude
  4. Session exits immediately with no output

Note: intermittent. May need several attempts to observe, and may succeed once before failing repeatedly.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown

Claude Code Version

2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Secondary issue that blocks rollback as a mitigation: claude install stable and claude install 2.1.202 both print "Installing Claude Code native build <target>..." then exit with no success message and no error, and the version remains 2.1.220. claude install latest on the same machine prints a full success block with version and location. So the installer succeeds for latest and fails silently for older targets.

Native install at C:\Users\<user>\.local\bin\claude.exe, auto-update channel latest. Claude in Chrome extension is installed, which may relate to the dependence on --no-chrome and to the existing Windows Chrome native-host crash reports (#76556, #23739, #24006, #21550).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗