Invalid API key · Please run /login

Resolved 💬 3 comments Opened Mar 28, 2025 by travelingflwr Closed Apr 29, 2025

Bug Description
Using mosh with BlinkShell to my Mac from my iPad Claude Code keeps losing my API and I have to keep using the login shortcut. This auth keeps creating new API keys in the API console. Please email at amydpnw@gmail.com if you need more info for this issue.

Environment Info

  • Platform: macos
  • Terminal: ssh-session
  • Version: 0.2.56
  • Feedback ID:

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\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 A$ (file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:523:2647)\n    at file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:1076:1394\n    at G (file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:433:12506)\n    at Pw (file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:1076:551)\n    at Ju2 (file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:2977:6907)\n    at file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:3189:613","timestamp":"2025-03-28T18:44:47.201Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:481:14)\n    at Socket.emit (node:events:524:28)\n    at Socket.emit (node:domain:489:12)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-03-28T18:44:47.398Z"},{"error":"Error: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the \"X-Api-Key\" or \"Authorization\" headers to be explicitly omitted\n    at file:///Users/amyde/node_modules/@anthropic-ai/claude-code/cli.js:1058:22596\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-03-28T18:47:21.002Z"}]

View original on GitHub ↗

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