claude-code - 💡(How to fix) Fix [BUG] Regression after v2.1.112: silent CLI exits on Windows, not fully fixed by NODE_OPTIONS [1 comments, 1 participants]

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…
GitHub stats
anthropics/claude-code#51620Fetched 2026-04-22 07:57:22
View on GitHub
Comments
1
Participants
1
Timeline
7
Reactions
0
Timeline (top)
labeled ×6commented ×1

Error Message

Claude Code CLI exits silently back to the shell during active sessions on Windows. No error message, no stack trace, no stderr output — the session just disappears. This happens randomly: during idle time, during tool calls, during long responses, and in longer sessions with heavy plugin/MCP use. Claude Code CLI should remain running through the session without silent termination. If a fatal error occurs, it should surface an error message, stack trace, or non-zero exit code the user can act on — not drop silently back to the shell.

Error Messages/Logs

No error output produced. Session terminates silently — nothing written to stderr, no crash log in ~/.claude/projects/, no JavaScript error trace. Windows Event Viewer occasionally shows Node.js OOM events for some users, but not for all affected users. 5. Actual: after a variable period (minutes to longer), the CLI silently exits back to the shell prompt — no error, no warning

Fix Action

Fix / Workaround

Partial workaround (works for some users only): Adding NODE_OPTIONS=--max-old-space-size=8192 to ~/.claude/settings.json env block resolves crashes for some affected users. This suggests Node heap OOM is one contributing factor. However, it does NOT resolve the issue for all affected users, indicating a second regression beyond memory pressure.

Team mitigation: Pinned to v2.1.112 and set DISABLE_AUTOUPDATER=1. Fully resolves the issue across all affected machines.

Code Example

No error output produced. Session terminates silently — nothing written to stderr, no crash log in ~/.claude/projects/, no JavaScript error trace. Windows Event Viewer occasionally shows Node.js OOM events for some users, but not for all affected users.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code CLI exits silently back to the shell during active sessions on Windows. No error message, no stack trace, no stderr output — the session just disappears. This happens randomly: during idle time, during tool calls, during long responses, and in longer sessions with heavy plugin/MCP use.

Multiple teammates are affected across different Windows machines. Version 2.1.112 is stable for everyone; every version we've tried after 2.1.112 reproduces this silent-exit behavior for a subset of users.

What Should Happen?

Claude Code CLI should remain running through the session without silent termination. If a fatal error occurs, it should surface an error message, stack trace, or non-zero exit code the user can act on — not drop silently back to the shell.

Error Messages/Logs

No error output produced. Session terminates silently — nothing written to stderr, no crash log in ~/.claude/projects/, no JavaScript error trace. Windows Event Viewer occasionally shows Node.js OOM events for some users, but not for all affected users.

Steps to Reproduce

  1. Install Claude Code on Windows 11 (any version after 2.1.112)
  2. Enable multiple plugins: skill-creator, claude-code-setup, figma, playwright, atlassian, superpowers, codex
  3. Start a session and use it actively with tool calls, skill invocations, and MCP server interactions
  4. Expected: session stays alive
  5. Actual: after a variable period (minutes to longer), the CLI silently exits back to the shell prompt — no error, no warning

Exact trigger is non-deterministic. Reproduces for multiple users on different machines with similar plugin loadouts. Downgrading to v2.1.112 fully eliminates the issue.

Claude Model

Multiple

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.112

Claude Code Version

2.1.114 and 2.1.116

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Partial workaround (works for some users only): Adding NODE_OPTIONS=--max-old-space-size=8192 to ~/.claude/settings.json env block resolves crashes for some affected users. This suggests Node heap OOM is one contributing factor. However, it does NOT resolve the issue for all affected users, indicating a second regression beyond memory pressure.

Team mitigation: Pinned to v2.1.112 and set DISABLE_AUTOUPDATER=1. Fully resolves the issue across all affected machines.

Affected models: Opus, Sonnet (both reproduce).

Plugins enabled on affected machines: skill-creator, claude-code-setup, figma, playwright, atlassian, superpowers, codex.

Related issues (similar ground, but don't fully explain this regression):

  • #5388 — JS heap OOM during MCP operations
  • #25926 — unbounded message accumulation
  • #18011 — V8 OOM on extended sessions
  • #48942 — skills sync memory leak
  • #34526 — silent exit on Windows background process

Ask:

  1. Confirm whether a known regression was introduced after v2.1.112
  2. Guidance on collecting actionable diagnostics from affected machines (no crash log is generated — Node exits silently)

extent analysis

TL;DR

Downgrade to version 2.1.112 or apply the partial workaround by adding NODE_OPTIONS=--max-old-space-size=8192 to the ~/.claude/settings.json env block to potentially mitigate the silent exit issue.

Guidance

  • The issue seems to be related to a regression introduced after version 2.1.112, and downgrading to this version has been confirmed to fully eliminate the problem.
  • To collect diagnostics, try running the Claude Code CLI with the --verbose flag to increase logging output, which may help identify the cause of the silent exit.
  • Consider monitoring system resources, such as memory and CPU usage, to see if there are any patterns or spikes that coincide with the silent exits.
  • Review the related issues (#5388, #25926, #18011, #48942, #34526) to see if any of the discussed fixes or workarounds may apply to this specific problem.

Example

No code snippet is provided as the issue is more related to configuration and versioning rather than a specific code problem.

Notes

The provided workaround (NODE_OPTIONS=--max-old-space-size=8192) only resolves the issue for some users, indicating that there may be multiple factors contributing to the silent exits. Further investigation is needed to identify and address all causes.

Recommendation

Apply the workaround by adding NODE_OPTIONS=--max-old-space-size=8192 to the ~/.claude/settings.json env block, as it has been shown to help some users, while also considering downgrading to version 2.1.112 if the workaround is not effective.

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] Regression after v2.1.112: silent CLI exits on Windows, not fully fixed by NODE_OPTIONS [1 comments, 1 participants]