[BUG] Claude crashed with RangeError: Invalid array length

Resolved 💬 4 comments Opened Nov 7, 2025 by rjeffmyers Closed Nov 13, 2025

Preflight Checklist

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

What's Wrong?

This error occurred on an Proxmox LXC Debian 13 container working on a Python FastAPI based app , 16 Gig of RAM and 8 cores assigned.

Asking Claude about the error it reports:
Looking at this error, it appears to be a bug in Claude Code's CLI itself related to rendering large amounts of data. The key
clues are:

  1. RangeError: Invalid array length - This happens when JavaScript tries to create an array with an invalid size
  2. Location: The error is in the rendering/display code (g1A, renderer, onRender)
  3. Context: Your git status shows a massive number of changes (thousands of files in backend/venv/ - the output was truncated at

40k characters)

Likely Cause

Claude Code is trying to display your git status in the UI, but with thousands of modified files in your virtual environment, it's
likely hitting a memory/array size limit when trying to render this information.

What Should Happen?

Not crash, maybe report that a limit is exceeded or critical with ability to correct error and not lose all context.

Error Messages/Logs

RangeError: Invalid array length
    at g1A (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:199:5463)
    at FYA.get (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:199:6664)
    at ETA.renderer (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:201:818)
    at ETA.onRender (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:220:5884)
    at ETA.unmount (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:220:7040)
    at DTA.handleExit (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:220:1480)
    at DTA.componentDidCatch (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:218:6030)
    at Lt.VA.componentDidCatch.b.callback (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:792)
    at Ft (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:98:18064)
    at B$ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:28640)
RangeError: Invalid array length
    at g1A (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:199:5463)
    at FYA.get (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:199:6664)
    at ETA.renderer (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:201:818)
    at ETA.onRender (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:220:5884)
    at gO0.signal (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:94:1908)
    at X (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:94:1315)
    at W (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:94:1355)
    at Timeout._onTimeout (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:94:1430)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)

Steps to Reproduce

random occurrence, cannot deliberately reproduce.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.35

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

running in xfce4-terminal

View original on GitHub ↗

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