When I type a prompt, I see API Error: 401

Resolved 💬 2 comments Opened Aug 20, 2025 by idunskyi Closed Aug 22, 2025

Bug Description
When I type a prompt, I see API Error: 401
{"type":"error","error":{"type":"authentication_error","message":"OAuth
authentication is currently not
supported."},"request_id":"req_011CSJE3dbZHXiaePRdWE3B1"}

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.85
  • Feedback ID: 333ed286-0000-49a3-ae03-873f06b1ea99

Errors

[{"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:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:940:6454","timestamp":"2025-08-20T03:02:26.836Z"},{"error":"Error: 1: 1 \n    at zk6 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1845:4892)\n    at async Ck6 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1845:2187)","timestamp":"2025-08-20T03:04:31.415Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSJDrmrLnrc9YcmcVo5qh\"}\n    at j4.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:932:2447)\n    at bP.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n    at bP.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-20T03:06:09.109Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:718:9932\n    at Q (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:677:13339)\n    at Bs2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1061:1992)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-20T03:06:09.113Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSJDrniBfLtUfM7m2Hwmz\"}\n    at j4.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:932:2447)\n    at bP.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n    at bP.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async UD1.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:27238)\n    at async UD1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:16345)\n    at async v9B (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:27089)\n    at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:22183\n    at async yH0 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:3514)\n    at async F11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1904:22153)","timestamp":"2025-08-20T03:06:09.307Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSJDwXW2rETCoYAqesS92\"}\n    at j4.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:932:2447)\n    at bP.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:2101)\n    at bP.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:949:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-20T03:07:13.575Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:718:9932\n    at Q (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:677:13339)\n    at Bs2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1061:1992)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-20T03:07:13.577Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"},\"request_id\":\"req_011CSJDwYM8HKJspgEk7of2T\"}\n    at j4.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:932:2447)\n    at bP.makeStatusError (file:///usr/local/lib/node_

Note: Error logs were truncated.

View original on GitHub ↗

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