I am getting this API error more frequently it seems over...
Resolved 💬 4 comments Opened Oct 1, 2025 by proth1 Closed Jan 6, 2026
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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗