RangeError: Maximum call stack size exceeded crash

Status Closed — not planned
Maintainer reply None cached
Activity 15 comments · opened Jan 8, 2026 · closed Apr 2, 2026

Bug Description

Claude Code crashes with RangeError: Maximum call stack size exceeded during a session.

Error Output

file:///C:/Users/Cassie/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3437
...
RangeError: Maximum call stack size exceeded
(Use `node --trace-uncaught ...` to show where the exception was thrown)

Node.js v22.12.0

Context

  • This occurred during normal usage
  • The crash dumps minified JS code to the terminal before the RangeError
  • Session becomes unrecoverable

Environment

  • OS: Windows 11
  • Node.js: v22.12.0
  • Claude Code: CLI version (npm install)

🤖 Generated with Claude Code

View original on GitHub ↗

15 Comments

ThatDragonOverThere · 7 months ago

Additional context: This crash occurred during normal usage without parallel sub-agents running. So this is a separate issue from the parallel agent context management bugs.

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16797
  2. https://github.com/anthropics/claude-code/issues/16871
  3. https://github.com/anthropics/claude-code/issues/16745

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

dsibinski · 7 months ago

Exactly the same issue here. When Claude was busy working on a bit larger set of changes, the exception occured:

file:///Users/dawid/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:3437
`,isMeta:!0}),...A]}async function t59(A,Q){if(GrQ())return;let[{tools:B},G,Z,Y]=await Promise.all([pI1(A),rz(

...

K),hookName:`PreToolUse:${Q.name}`,toolUseID:G,hookEvent:"PreToolUse"})}},yield{type:"stop"}}}catch(I){r(I instanceof Error?I:Error(String(I))),yield{type:"stop"};return}}function kF1(A){if(A instanceof lY)return A.message||b_;if(!(A instanceof Error))return String(A);let B=ZM0(A).filter(Boolean).join(`

...

RangeError: Maximum call stack size exceeded

I'm on MacOS, node version v22.15.0. I suspect it may be related to Node v22 - I upgraded from Node v20 yesterday.

rubrical-worker · 7 months ago

I will close my duplicate bug, but dev should note this:

Added: https://github.com/anthropics/claude-code/issues/16949#issuecomment-3725946749

The comment includes:

  • Complete minified stack trace from your error
  • Key observations about the code paths involved (xF1 tool concurrency class, processQueue(), async iterators)
  • Hypothesis about recursive queue processing or async iterator corruption

✶ Insight ─────────────────────────────────────
What the stack trace reveals:

  • xF1 class manages concurrent tool execution with a queue
  • processQueue() is called recursively via Z.finally(() => this.processQueue())
  • If two sessions share state and both trigger queue processing, this could create unbounded recursion
  • The tengu_context_size telemetry function suggests background polling was active when crash occurred
ThatDragonOverThere · 7 months ago

More context: Was asking Claude to fix a batch file import path issue when the crash occurred. Claude had previously tried to recreate an entire 900+ line file instead of fixing the import (separate issue #16780). This crash happened on a retry of the same task.

cscheid · 7 months ago

This is happening fairly consistently for me since the auto-upgrade to Claude Code 2, to the point that Claude Code is more or less unusable in any session longer than 15 minutes or so.

WhatcomSci · 7 months ago

It seems to happen when idle mostly for me.

folknor · 7 months ago
It seems to happen when idle mostly for me.

Same here, happened while the CLI and agent was supposedly completely idle in a background tab.

Przemyslaw10 · 7 months ago

Same here, also, my usage limit suddenly blown up to 90% although I barely used Claude code (pro subscription).

herskinduk · 7 months ago

I'm also experiencing this whilst CC is idle.

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

Swiffers · 6 months ago

I'm facing the issue

mkona-acquis · 5 months ago

im facing <tool_use_error>Sibling tool call errored</tool_use_error>

github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.