[BUG] Large requests fail with connection error after 15-30min runtime, short requests still work

Resolved 💬 2 comments Opened Jan 11, 2026 by konian71 Closed Jan 11, 2026

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?

After Claude Code runs for 15-30 minutes, large requests (e.g., reading 300+ line files or complex workflows) fail with connection errors, while short simple messages still work fine. Restarting Claude Code fixes the issue completely.
Environment:

Claude Code Version: 2.1.4
OS: Debian Linux
Location: Hetzner Helsinki datacenter

Symptoms:

Short messages (e.g., "hi", simple questions): ✅ Work fine
Large operations (reading big files, /doit workflows): ❌ API Error: Connection error
Shows: ✻ Crunched for Xm Ys indefinitely on large requests
After restart: Both short AND large requests work perfectly

Reproduction:

Start Claude Code CLI
Work for 15-30 minutes
Try large operation (e.g., read 300-line TODO.md file)
Get connection error / timeout
Try short message "hi" → works fine ✅
Restart Claude Code → large operations work again ✅

This suggests:

Not a general connection issue (short messages work)
Possibly a timeout or buffer issue for large payloads after extended runtime
Some internal state gets corrupted after 15-30min that affects large requests only

What Should Happen?

requests should work fine, not require restart.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce:

Start Claude Code CLI
Work normally for 15-30 minutes
Execute large request (e.g., read 300-line file or run workflow command)
Observe: Connection error / timeout
Execute short message like "hi"
Observe: Works fine
Restart Claude Code
Execute same large request
Observe: Works immediately

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.x???

Claude Code Version

2.1.4

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗