[BUG] RangeError: Invalid string length

Resolved 💬 3 comments Opened Sep 11, 2025 by claude-ai-netra Closed Sep 15, 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?

RangeError: Invalid string length
    at Socket.<anonymous> (file:///C:/Users/USER/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:825:2870)
    at Socket.emit (node:events:520:35)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Node.js v24.8.0 

What Should Happen?

work

Error Messages/Logs

RangeError: Invalid string length
    at Socket.<anonymous> (file:///C:/Users/USER/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:825:2870)
    at Socket.emit (node:events:520:35)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Node.js v24.8.0

Steps to Reproduce

file:///C:/Users/USER/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:825
`);if(G!==-1){if(ZQ="",B}}}function hU1(A,B,Q,Z){let G="running",Y,I=lUA(A.stdout),W=lUA(A.stderr);if(Z){let K=new i41(1000),H=0,z=(D)=>{let E=D.toString().split(`

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.111 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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