Invalid API key · Please run /login

Resolved 💬 9 comments Opened Aug 6, 2025 by ctaloi Closed Jan 9, 2026

Bug Description
Unable to authenticate when connected over SSH and running claude. When locally logged in Claude works fine, when connecting over SSH I see the /api key missing and when I try to login (with MAX $200) it says authenticated (shows my email) and then back to /api key missing

Environment Info

  • Platform: darwin
  • Terminal: ssh-session
  • Version: 1.0.69
  • Feedback ID:

Errors

[{"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-08-06T01:57:46.529Z"},{"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/chris/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1270:6454\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-06T01:59:01.772Z"}]

View original on GitHub ↗

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