[BUG] Repeated API 500 "Internal server error" during single Claude Code session (3 occurrences)
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?
During a single Claude Code session working on a feature branch in a private repository, I encountered 3 separate API 500 errors ("Internal server error") across different stages of the workflow. Each time, Claude Code displayed the error and then prompted "You received an API: 500 error but you should be able to continue now," after which work resumed.
The 500 errors occurred during:
- Committing code (git add + git commit) after implementing a React component — occurred after Prettier reformatting triggered a retry. Request ID: req_011CXoLZD3BpAqK4abSb2hBS
- Running the full test suite (make test-local) during the REFACTOR phase — occurred after tests completed (353 passing) during self-review. Request ID: req_011CXoLnojrz75jt7ZAq6BF6
- Updating a GitHub issue via MCP (github – Create or update issue) — occurred while updating acceptance criteria on a GitHub issue. Request ID: req_011CXoLquwkkmYxNiLyC53Jo
All three errors returned the same response body:
{"type":"error","error":{"type":"api_error","message":"Internal server error"}}
These happened within a single extended session on February 4, 2026, roughly within the same timeframe. The errors did not prevent completion of the task, but they caused delays (2+ minutes of "cogitating/crunching" before the error surfaced each time) and disrupted the workflow.
What Should Happen?
API requests should complete successfully without returning 500 Internal Server Error responses. If transient server-side issues occur, they should be retried transparently by Claude Code without surfacing the error to the user and requiring a manual "continue" prompt. Three 500 errors in a single session suggests either a systemic server-side issue or a problem with how Claude Code is constructing/sending requests.
Error Messages/Logs
Error 1 (during git commit):
API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CXoLZD3BpAqK4abSb2hBS"}
Error 2 (during test suite / self-review):
API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CXoLnojrz75jt7ZAq6BF6"}
Error 3 (during GitHub issue update via MCP):
API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server error"},"request_id":"req_011CXoLquwkkmYxNiLyC53Jo"}
Steps to Reproduce
- Start a Claude Code session on a feature branch with an active GitHub MCP integration
- Work through a full TDD cycle: write tests → implement component → commit → run linter → run full test suite → self-review → update GitHub issue
- The session involved frontend React/TypeScript work and backend Python tests (353 tests)
- 500 errors appeared at various points — during commits, after test runs, and during MCP-based GitHub API calls
- Each time, Claude Code paused for 2+ minutes before surfacing the error
- After the "you should be able to continue" prompt, work resumed normally
Note: This may not be deterministically reproducible as it appears to be a server-side issue. The request IDs above should help Anthropic trace the specific failures.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.31
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- Project: Private GitHub repository
- Branch: Feature branch for a frontend component implementation
- All three errors shared the request_id prefix "req_011CXoL" suggesting they were routed to the same backend infrastructure
- MCP servers in use: GitHub
- Pre-commit hooks active: ruff (backend), eslint + prettier (frontend)
- The session was running a full RED-GREEN-REFACTOR TDD cycle per a structured development workflow
- Screenshots of all three errors are attached below
This issue has 13 comments on GitHub. Read the full discussion on GitHub ↗