Invalid String Length in Socket Stream Processing
Resolved 💬 4 comments Opened May 23, 2025 by tumma72 Closed Oct 10, 2025
Bug Description
While running and attempting to fix a bug Claude exited with the following error:\
RangeError: Invalid string length
at Socket.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:27881)
at Socket.emit (node:events:507:28)
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)
Environment Info
- Platform: macos
- Terminal: cursor
- Version: 1.0.2
- Feedback ID: db1fc9d6-25c6-44e7-b3de-f663181ebd5d
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at cG (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:3513)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:15313\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:13335)\n at oR1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:14562)\n at aI (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:574:14179)\n at JU2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2061:20995)","timestamp":"2025-05-23T13:47:14.947Z"}]This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗