claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

I am getting this API error more frequently it seems over...

Open proth1 opened this issue 2 months ago • 2 comments

Bug Description I am getting this API error more frequently it seems over the past couple of days:

⎿ API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTgYW2QNsLqYCEVEaHrqV"} · Please run /login

I have other terminal sessions working fine when this happens and I usually have to kill the terminal session and restart it to get around the API error.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.0.1
  • Feedback ID:

Errors

[{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16529)\n    at pBB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3537:659)\n    at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1679:952)\n    at call.next (<anonymous>)\n    at QO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:30497)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1757:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-30T17:30:31.524Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16529)\n    at pBB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3537:659)\n    at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1679:952)\n    at call.next (<anonymous>)\n    at QO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:30497)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1757:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-30T17:30:32.708Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16529)\n    at pBB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3537:659)\n    at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1679:952)\n    at call.next (<anonymous>)\n    at QO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:30497)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1757:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-30T17:31:24.027Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16529)\n    at pBB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3537:659)\n    at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1679:952)\n    at call.next (<anonymous>)\n    at QO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:30497)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1757:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-30T17:31:24.510Z"},{"error":"Error: Request was aborted.\n    at ag._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:899:4711)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-30T17:55:34.518Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16529)\n    at pBB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3537:659)\n    at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1679:952)\n    at call.next (<anonymous>)\n    at QO (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:30497)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1757:1328\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-01T04:07:28.889Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16529)\n    at pBB (file:///o

Note: Error logs were truncated.

proth1 avatar Oct 01 '25 13:10 proth1

I am getting those too, instead of killing the terminal I have been logging in again every time (maybe that's why it's completely frozen right now..). I am on windows version 2.0.2

0MarkB avatar Oct 01 '25 15:10 0MarkB

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.

github-actions[bot] avatar Dec 06 '25 10:12 github-actions[bot]