[Bug] v2.1.121 Windows: Claude Code REPL silently exits inside PowerShell host during long-running agent + dense Bash subprocess chain

Resolved 💬 14 comments Opened May 1, 2026 by ThatDragonOverThere Closed Jun 10, 2026

Summary: Claude Code REPL silently exits inside an active Windows PowerShell window. The parent PowerShell process remains alive — user is dropped to a bare PowerShell prompt with whatever they were typing at the moment of crash stranded at the cursor. No error message, no traceback, no recovery banner — the REPL just vanishes mid-session.

Version: v2.1.121 on Windows. Not yet tested on v2.1.123 / v2.1.124 / v2.1.126 — filing first to capture the repeat pattern; upgrading next.

Steps to reproduce (best inference from 3 crashes observed same morning):

  1. Open Claude Code in a Windows Terminal tab running PowerShell
  2. Dispatch a long-running sub-agent (Task tool); observed crashes happened at agent runtimes of 10-30 minutes
  3. Agent runs a dense sequence of Bash subprocess invocations — observed pattern: cd <path> && python <script>.py 2>&1 | grep -E "..." — bash-style && chaining, multiple back-to-back invocations
  4. After ~50+ Bash tool uses inside the agent, the parent Claude Code REPL silently exits

Expected: Long-running agents with many Bash subprocess invocations remain stable — no silent process exit.

Actual: Claude Code REPL process disappears. The parent PowerShell tab survives. Whatever the user was typing at the moment of crash stays stranded at the bare PS prompt as orphan characters. Session work in progress is lost. Recovery requires claude --resume <uuid> and only works if the JSONL was flushed before the crash.

Pattern across 3 morning crashes:

  • All in long-running agent sessions (10+ min runtime)
  • All preceded by dense sequences of Bash subprocess invocations
  • All left the same visible artifact: stranded characters at a bare PS prompt
  • All silent: no error dialog observed; user was remote-desktop and could not capture moment-of-crash state from Application event log

Workaround attempt: v2.1.126 release notes describe significant rework of the Windows PowerShell host code path (PowerShell promoted to primary Windows shell + bare--- mis-flagging fix). Upgrading from v2.1.121 → v2.1.126 may incidentally resolve this — will report back after testing.

Platform: Windows 11, Claude Code v2.1.121, Bash as primary shell (default in v2.1.121 on Windows), agents dispatched via Task tool.

Related: Same pattern of silent failure on Windows as the cron-loss-on-compact bug (#55033) and the Opus → Sonnet silent downgrade (#54426) — three distinct silent-failure modes for active sessions on Windows in the v2.1.121 timeframe.

View original on GitHub ↗

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