[BUG] RangeError: Invalid string length when processing large benchmark output
Resolved 💬 3 comments Opened Sep 27, 2025 by rabbitson87 Closed Sep 30, 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?
Claude Code CLI crashes with RangeError: Invalid string length when processing large benchmark output from FluxMQ server. The CLI becomes completely
unusable and terminates with a JavaScript engine error.
What Should Happen?
Claude Code should handle large outputs gracefully, either by:
- Truncating very long outputs with a warning
- Streaming output in chunks
- Providing pagination for large responses
- Setting reasonable limits on output processing
Error Messages/Logs
RangeError: Invalid string length
at file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1748:4370
at file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1829:3000
at file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2236:27268
at yR (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:20239)
at kR (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:20722)
at Object.useState (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:27275)
at T5Q.useState (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:10:7178)
at R7 (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2236:27156)
at VC (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)
at Ry (file:///Users/sonheesung/.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:3227)
ERROR Invalid string length
Steps to Reproduce
- Run a command that generates extensive output (1000+ lines)
- In this case: Running FluxMQ benchmark with Java client that produces:
- Extensive server logs with connection details
- Java client warnings about deprecated methods
- Multiple correlation_id traces
- Benchmark progress output
- Wait for Claude to process the large output
- CLI crashes with RangeError before completing the response
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.127 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
- The error occurs specifically when processing very large text outputs
- This appears to be hitting JavaScript engine string length limits
- The crash makes Claude Code completely unusable until restart
- Issue occurs during the output processing phase, not during the initial command execution
- Similar issues might occur with any command that generates extensive logging or debugging output
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗