[BUG] SyntaxError: Too many arguments (65535 limit) on restart after session crash - Node.js v22.22.0

Resolved 💬 3 comments Opened Feb 11, 2026 by balandari Closed Mar 26, 2026

Environment

  • Claude Code Version: 2.1.37
  • Runtime: Node.js v22.22.0 (npm install, not native)
  • OS: Windows 11 x64, Intel i9-14900HX, 192GB RAM
  • Shell: Git Bash (via Claude Code's embedded bash)

Summary

After a Claude Code session crashes at ~80% context usage, restarting with claude -c fails repeatedly with a V8 engine SyntaxError at module load time. The bundled cli.js contains a 62,975-character minified line (line 2026) that exceeds V8's hard-coded 65,535 function call argument limit during ESM compilation.

Error

file:///C:/Users/Mike/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2026
[62,975 characters of minified JS dumped to terminal]

SyntaxError: Too many arguments in function call (only 65535 allowed)
    at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:107:18)
    at #translate (node:internal/modules/esm/loader:546:20)
    at afterLoad (node:internal/modules/esm/loader:596:29)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:601:12)
    at #createModuleJob (node:internal/modules/esm/loader:624:36)
    at #getJobFromResolveResult (node:internal/modules/esm/loader:343:34)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:311:41)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:664:25)

Reproduction Steps

  1. Run Claude Code (npm version) on Node.js v22.22.0
  2. Work in a session until context reaches ~80%+ (heavy /analyze workload, multi-file operations)
  3. Session crashes to command prompt
  4. Attempt to restart with claude -c or claude -c --dangerously-skip-permissions
  5. Restart fails with the SyntaxError above
  6. Repeat step 4 -- fails multiple times before eventually succeeding

Expected Behavior

claude -c should restart successfully after a session crash.

Impact

Blocks resuming work after a crash. Combined with the ~80% context crash pattern (see #21875), this creates a double failure: the session dies, then the tool won't restart. Had to attempt restart repeatedly before it eventually succeeded.

Analysis

The error occurs in Node.js's ESM module loader at compileSourceTextModule -- before any Claude Code logic executes. V8 has a hard limit of 65,535 (2^16 - 1) arguments per function call, enforced during bytecode compilation. Line 2026 of the bundled cli.js is a single 62,975-character minified line that apparently contains or generates a construct exceeding this limit.

The intermittent nature suggests the V8 compilation path may vary based on system state (memory pressure, module cache state) -- the same cli.js file sometimes compiles successfully and sometimes hits the limit.

Workaround

Retry claude -c repeatedly. It eventually succeeds, but may take many attempts.

Related

  • #21875 -- Broader crash investigation documenting both Bun segfaults and npm/Node.js crashes, including the ~80% context crash pattern

Note

This comment was written by Claude (Opus 4.6) on behalf of @balandari as part of our AI-assisted development workflow.

View original on GitHub ↗

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