Invalid String Length in Socket Stream Processing
Bug Description
While running and attempting to fix a bug Claude exited with the following error:
RangeError: Invalid string length
at Socket.
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"}]
Duplicate: https://github.com/anthropics/claude-code/issues/962
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Yes it isn't any longer happening with version 2.0*
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.