Intermittent API 500 errors during tool calls (Write, large output)
Resolved 💬 3 comments Opened Apr 13, 2026 by carlosismael Closed Apr 17, 2026
Description
Getting intermittent API 500 errors (api_error: Internal server error) during Claude Code sessions. Two occurrences in a single session (~90 min), both during tool calls that produce or process large outputs.
Request IDs
req_011Ca21cgCgRpSZ8s59e7zKJ— occurred during/after a series ofgit commitcalls with large pre-commit hook output (lint + build + EDD check for 9 NestJS projects, ~200 lines per commit × 5 atomic commits)req_011Ca228BYbC2iWtvaLVfkMv— occurred during aWritetool call creating a 160-line markdown file (eval report)
Environment
- Platform: Windows 11 (win32)
- Shell: Git Bash
- Model: claude-opus-4-6 (1M context)
- Interface: VSCode extension
- Session context: Moderately large (~60+ tool calls, EDD development cycle with multiple file reads, writes, and bash commands)
Behavior
- Both errors are transient — the operations appear to complete after the error (file was written, commits went through)
- The errors disrupt the conversation flow (user sees the raw 500 JSON)
- Both occurred during periods of heavy tool use with large outputs
Reproduction
Not deterministic, but the pattern suggests correlation with:
- Large tool output (pre-commit hooks running lint+build across 9 projects)
- Accumulated context size in long sessions
- Rapid sequential tool calls
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗