claude-code - 💡(How to fix) Fix API 500s with no known cause. [4 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48605Fetched 2026-04-16 06:55:45
View on GitHub
Comments
4
Participants
4
Timeline
5
Reactions
9
Timeline (top)
commented ×4cross-referenced ×1

Error Message

[{"error":"Error: EISDIR: illegal operation on a directory, read\n at readSync (unknown)\n at readSync (/$bunfs/root/src/entrypoints/cli.js:53:1553)\n at hUH (/$bunfs/root/src/entrypoints/cli.js:126:5400)\n at FR (/$bunfs/root/src/entrypoints/cli.js:127:181)\n at Fv (/$bunfs/root/src/entrypoints/cli.js:129:54)\n at uh1 (/$bunfs/root/src/entrypoints/cli.js:8222:8927)\n at D (/$bunfs/root/src/entrypoints/cli.js:8222:8144)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8222:8474)\n at zF (/$bunfs/root/src/entrypoints/cli.js:476:63166)\n at XAH (/$bunfs/root/src/entrypoints/cli.js:476:76219)","timestamp":"2026-04-15T14:43:29.184Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5jZ6ZSAvGaaC2CBJui2"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:43:36.855Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5jkogWwPCgAUi4kq1gg"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:46:15.822Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5jmPS2Vk8a1VFHhKc3k"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:46:23.518Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5jv9YMi3Z9iSGBPGLyc"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:48:17.381Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5jvVZ8FmHCkfzBRz81e"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:48:27.192Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5k7yEpjMBVXsj3UaT3q"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:51:02.994Z"},{"error":"Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5kEjS4Na91k28YNF8Xu"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:52:34.467Z"}]

Code Example

[{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readSync (unknown)\n    at readSync (/$bunfs/root/src/entrypoints/cli.js:53:1553)\n    at hUH (/$bunfs/root/src/entrypoints/cli.js:126:5400)\n    at FR (/$bunfs/root/src/entrypoints/cli.js:127:181)\n    at Fv (/$bunfs/root/src/entrypoints/cli.js:129:54)\n    at uh1 (/$bunfs/root/src/entrypoints/cli.js:8222:8927)\n    at D (/$bunfs/root/src/entrypoints/cli.js:8222:8144)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8222:8474)\n    at zF (/$bunfs/root/src/entrypoints/cli.js:476:63166)\n    at XAH (/$bunfs/root/src/entrypoints/cli.js:476:76219)","timestamp":"2026-04-15T14:43:29.184Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jZ6ZSAvGaaC2CBJui2\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:43:36.855Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jkogWwPCgAUi4kq1gg\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:46:15.822Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jmPS2Vk8a1VFHhKc3k\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:46:23.518Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jv9YMi3Z9iSGBPGLyc\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:48:17.381Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jvVZ8FmHCkfzBRz81e\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:48:27.192Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5k7yEpjMBVXsj3UaT3q\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:51:02.994Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5kEjS4Na91k28YNF8Xu\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:52:34.467Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description This is consistently happening. Please fix it ⎿ API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011Ca5k7yEpjMBVXsj3UaT3q"} · check status.claude.com

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 2.1.109
  • Feedback ID: 5d599ca9-a430-4754-87b3-d70ad86a66f0

Errors

[{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readSync (unknown)\n    at readSync (/$bunfs/root/src/entrypoints/cli.js:53:1553)\n    at hUH (/$bunfs/root/src/entrypoints/cli.js:126:5400)\n    at FR (/$bunfs/root/src/entrypoints/cli.js:127:181)\n    at Fv (/$bunfs/root/src/entrypoints/cli.js:129:54)\n    at uh1 (/$bunfs/root/src/entrypoints/cli.js:8222:8927)\n    at D (/$bunfs/root/src/entrypoints/cli.js:8222:8144)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8222:8474)\n    at zF (/$bunfs/root/src/entrypoints/cli.js:476:63166)\n    at XAH (/$bunfs/root/src/entrypoints/cli.js:476:76219)","timestamp":"2026-04-15T14:43:29.184Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jZ6ZSAvGaaC2CBJui2\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:43:36.855Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jkogWwPCgAUi4kq1gg\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:46:15.822Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jmPS2Vk8a1VFHhKc3k\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:46:23.518Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jv9YMi3Z9iSGBPGLyc\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:48:17.381Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5jvVZ8FmHCkfzBRz81e\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:48:27.192Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5k7yEpjMBVXsj3UaT3q\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:51:02.994Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Ca5kEjS4Na91k28YNF8Xu\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52527)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T14:52:34.467Z"}]

extent analysis

TL;DR

The issue is likely due to an "EISDIR: illegal operation on a directory" error, which may be causing the API to return a 500 Internal Server Error.

Guidance

  • Check the file system permissions and ensure that the directory being accessed is not being treated as a file.
  • Verify that the readSync function is being used correctly and that the file path being passed to it is valid.
  • Investigate the cli.js file at lines 53:1553, 126:5400, and 11:52527 to see where the error is originating from.
  • Consider adding error handling to catch and handle the "EISDIR" error specifically.

Example

No code example is provided as the issue is related to a specific error in a proprietary codebase.

Notes

The issue seems to be related to a specific codebase and environment, so the solution may require knowledge of the specific implementation and dependencies.

Recommendation

Apply a workaround to handle the "EISDIR" error, such as checking if the path is a directory before attempting to read from it, to prevent the API from returning a 500 Internal Server Error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING