[BUG] Intermittent 500 Internal server error (api_error) for Opus 4.8 — ~50–80% of requests fai

Open 💬 0 comments Opened Jun 23, 2026 by yachelovek1337

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Most requests fail with API Error: 500 Internal server error (api_error).
This is isolated to the Opus 4.8 model — same machine, same network, identical
claude -p "ping", 6 runs each:

| Model | Failures |
|------------------------|----------|
| claude-sonnet-4-6 | 0/6 |
| claude-haiku-4-5 | 0/6 |
| claude-opus-4-8 | 5/6 |
| claude-opus-4-8[1m] | 2/6 |

Sonnet and Haiku are rock solid; Opus 4.8 returns 500 ~50–80% of the time.
This is NOT OS-specific — the error returns from the API with a request_id,
so it's server-side, not a client/platform issue. Network is fine
(curl https://api.anthropic.com/v1/messages returns a clean 405 as expected).

What Should Happen?

Opus 4.8 should respond normally without 500 api_errors, like Sonnet/Haiku do on the same machine.

Error Messages/Logs

[ERROR] Error streaming, falling back to non-streaming mode:
  {"type":"error","error":{"type":"api_error","message":"Internal server error"},
   "request_id":"req_011CcLMJVa3vHExiCcUs8Q6v"}
[ERROR] API error (attempt 1/11): 500
  {"type":"error","error":{"type":"api_error","message":"Internal server error"},
   "request_id":"req_011CcLMJc1FuURHdhvUDdUqF"}
[ERROR] API error x-client-request-id=dbf50f94-2be2-47b1-80e3-36dbda956e8e

Steps to Reproduce

  1. Set the model to Opus 4.8 (e.g. /model opus or fast mode).
  2. Run a trivial prompt repeatedly: for i in $(seq 1 6); do claude -p "ping"; done
  3. ~50–80% of the runs return:

"API Error: 500 Internal server error."

  1. Switch to Sonnet/Haiku (claude --model claude-sonnet-4-6 -p "ping")

and the same loop succeeds 6/6.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.186 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

Failure is per-request and intermittent (retries up to attempt 11/11).
Strictly correlated with the Opus 4.8 model — other models on the same setup
are unaffected. Likely an Opus 4.8 capacity/availability issue rather than a
CLI bug. Request IDs above are provided for server-log lookup.

View original on GitHub ↗