claude-code
claude-code copied to clipboard
[BUG] tools.[X].custom.name: String should have at most N characters
Bug Description API error
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.24
- Feedback ID: 47cd0c9e-d5d7-4332-85ca-ef78c3e322c1
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:892:11)\n at execSync (node:child_process:964:15)\n at HZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8863\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n at tJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8009)\n at HS (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:7090)\n at T6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11202)","timestamp":"2025-06-15T17:34:50.822Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:482:14)\n at Socket.emit (node:events:507:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:559:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)\n at Readable.push (node:internal/streams/readable:390:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-06-15T17:34:54.476Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.49.custom.name: String should have at most 64 characters\"}}\n at h6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1329:12578)\n at Lw.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:2082)\n at Lw.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:5257)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async ME2.K11.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:22008)\n at async K11 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:12203)\n at async ME2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:21854)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17103\n at async yt1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:5151)\n at async Fu (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17073)","timestamp":"2025-06-15T17:35:04.885Z"}]
umm, doesn't the stack trace say it right here:
"tools.49.custom.name: String should have at most 64 characters"}}
different providers/clients etc. have different constraints on how long a tool name should be. anyway I agree with your sentiment, but it would be good to confirm that you have tried this while running "verbose" and "debug" and you read the stack trace...
it is kind of Vague .. this happens when there is a tool call like web_Search has started and we interrupt it using escape.. then try to ask another question, it keeps erroring out.. and also I waited for like few minutes, thinking the background toold call could've finished but still it didnt process.. only way was if i exit and re-initiate claude.. even system commands like /clear /compact etc would not work ... could you please check and let me know ?
Tool names can now be up to 128 characters, so this should be easier to deal with now.
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.