claude-code - 💡(How to fix) Fix [BUG] Windows: stopShellPty on tab switch kills session with exit code 4294967295 — regression in May 27+ build

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

The user-visible error is:

Root Cause

  • #62559 — macOS counterpart (SIGTERM / exit 143), labeled regression
  • #62985 — macOS counterpart, same stopShellPty root cause

Code Example

[CCD] LocalSessions.setFocusedSession: sessionId=null
[CCD] LocalSessions.setFocusedSession: sessionId=local_<session-B>
LocalSessions.stopShellPty: sessionId=local_<session-A>   ← kills active session
[IdleManager:session] Starting idle timeout for local_<session-A>: 900s
Shell PTY for session local_<session-A> exited (stale — already replaced)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this is the Windows-specific counterpart of #62559 and #62985
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

On Windows, switching between session tabs in Claude Code Desktop kills the unfocused session's CLI process with exit code 4294967295 (= 0xFFFFFFFF = Windows equivalent of SIGTERM/exit 143 on macOS).

The user-visible error is:

세션이 중단되었습니다 / 메시지를 다시 보내보세요. Claude Code process exited with code 4294967295

This is the same regression as #62559 / #62985 but on Windows. Exit code 143 (SIGTERM) on macOS maps to 4294967295 (0xFFFFFFFF, i.e. -1 as signed 32-bit) on Windows when a process is forcibly terminated.

Log Signature (from %APPDATA%\Claude\logs\main.log)

[CCD] LocalSessions.setFocusedSession: sessionId=null
[CCD] LocalSessions.setFocusedSession: sessionId=local_<session-B>
LocalSessions.stopShellPty: sessionId=local_<session-A>   ← kills active session
[IdleManager:session] Starting idle timeout for local_<session-A>: 900s
Shell PTY for session local_<session-A> exited (stale — already replaced)

Matching the exact pattern described in #62559.

Steps to Reproduce

  1. Open two or more local Code sessions in Claude Code Desktop (Windows)
  2. Be active in session A
  3. Click session B in the sidebar
  4. Click back to session A
  5. Session A shows "Claude Code process exited with code 4294967295"

What Should Happen?

Switching tabs should not kill the unfocused session's CLI process — it should stay alive in the background (as it did before the May 27 build).

Additional Context

  • This causes multiple interruptions per hour during normal multi-session workflows
  • ClaudeSessionWatch automation (task scheduler, 5-min polling) partially mitigates by restarting sessions, but there is a 5–10 min gap before recovery
  • The 15-minute IdleManager session timeout also kills PTY on inactivity, compounding the issue
  • Previously worked fine; regression started with the update received on 2026-05-31 (claude.exe timestamped 16:22 KST, Desktop app 21:36 KST)

Environment

  • OS: Windows 11 (10.0.26200), HP laptop, Modern Standby (S0ix)
  • Claude Code Desktop: 1.9659.2.0
  • claude.exe: 2.1.156
  • Platform: claude.ai (OAuth)

Related Issues

  • #62559 — macOS counterpart (SIGTERM / exit 143), labeled regression
  • #62985 — macOS counterpart, same stopShellPty root cause

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Windows: stopShellPty on tab switch kills session with exit code 4294967295 — regression in May 27+ build