HTTP 500 cascade during long-running autonomous session (output generation crash, not context overflow)
Resolved 💬 3 comments Opened Feb 18, 2026 by darkhipo Closed Mar 19, 2026
Summary
Claude Opus 4.6 via Claude Code hit 4 consecutive HTTP 500 Internal Server Errors during a coding session. The crash occurred during output generation, not input processing — the preceding tool call returned successfully.
Request IDs
req_011CYFmpPc7ChW182KHj5kworeq_011CYFmvAWybKgz7R6z7rQCTreq_011CYFmzPUhiKwSkwDTiSz8Greq_011CYFn6Cb2JrE9kcHFsWiuP
Reproduction pattern
- Task: Iterative code review and security hardening of a Python file (~3,800 lines) — the model was reading code, identifying issues, and writing fixes
- Last successful tool call:
shellrunningsed -n '2615,2640p'on the file — output returned normally - Crash point: Generating the model's next response after receiving the tool output
Why this is not routine context overflow
- Context length exceeded errors return as 4xx with a clear message. These were raw 500 Internal Server Error with no explanatory payload.
- The tool call succeeded — input processing (reading the context, executing the tool) completed normally. The failure was specifically in output token generation.
- All 4 retries failed against the same context, suggesting a persistent broken state rather than a transient infrastructure blip.
- The shared request ID prefix (
req_011CYFm*) suggests rapid sequential retries hitting the same failure mode.
Environment
- Claude Code CLI (latest as of 2026-02-18)
- Model: Claude Opus 4.6 (
claude-opus-4-6) - macOS Darwin 25.2.0, Apple Silicon
- MCP tools active (tool calls via MCP server)
What we're NOT reporting
This is not a complaint about rate limiting, context limits, or expected error handling. Those work fine. This is specifically about unhandled 500s during output generation triggered by a legitimate usage pattern. Filing because your engineering team can trace the request IDs to see exactly what failed internally.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗