[BUG] API timeout retry regression in 1.0.8

Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 12 comments · opened Jun 2, 2025 · closed Jun 2, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [X] Anthropic API
  • Claude CLI version: 1.0.8
  • Operating System: Ubuntu 24.04
  • Terminal: gnome-terminal

Bug Description

Claude Code no longer retries automatically after API timeouts. Previous versions did retries with exponential backup, but 1.0.8 just gives up immediately. Example:

╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: my_cwd       │
╰───────────────────────────────────────────────────╯


 What's new:
  • Fixed Vertex AI region fallback when using CLOUD_ML_REGION
  • Increased default otel interval from 1s -> 5s
  • Fixed edge cases where MCP_TIMEOUT and MCP_TOOL_TIMEOUT weren't being respected
  • Fixed a regression where search tools unnecessarily asked for permissions
  • Added support for triggering thinking non-English languages

> git commit the staged changes
  ⎿  API Error: Request timed out.

> 

View original on GitHub ↗

12 Comments

ant-kurt collaborator · 1 year ago

Hi @thomasj02, can you confirm a couple things:

  • Does this repro in lower versions (like v1.0.7)?
  • If you set some of the debug flags -ANTHROPIC_LOG=debug DEBUG=* or --debug --verbose, do you see a x-should-retry header being returned by the backing API, or is this just failing to connect entirely?
rajulbhatnagar · 1 year ago
  • Does this repro in lower versions (like v1.0.7)?

No. Only started seeing it 1.0.8. I am using the bedrock provider.

ant-kurt collaborator · 1 year ago

Thanks for calling out that you're seeing this in Bedrock too. Can you check the debug flags mentioned above @rajulbhatnagar ?

solomkinmv · 1 year ago

The same on mac os. Worked fine with v1.0.7.

ogibogib · 1 year ago

When the context reaches its limit, Claude Code does not automatically 'compact' and stops after an error occurs. (1.0.8)

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens exceed context limit: 174975 + 32000 > 200000, decrease input length or max_tokens and try again"}}

bcherny collaborator · 1 year ago

This should be feeling better in 1.0.9. @thomasj02 @solomkinmv @hikmat-subscript @rajulbhatnagar mind upgrading and reporting back if it's feeling better for you? claude update to force an upgrade

solomkinmv · 1 year ago

Fixed for me, thanks

rajulbhatnagar · 1 year ago

Retry handling works like before in 1.0.9. Thanks

thomasj02 · 1 year ago

I'm actually still having a problem in 1.0.9. It seems to retry once and then give up:

  ⎿  API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10)
  ⎿  API Error: Request timed out.
ioannidesalex · 1 year ago

Same here. And a lot of timeouts compared to before.

thomasj02 · 1 year ago

It actually seems somewhat random how many tries it does before giving up

  ⎿  API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10)
  ⎿  API Error (Request timed out.) · Retrying in 1 seconds… (attempt 2/10)
  ⎿  API Error (Request timed out.) · Retrying in 2 seconds… (attempt 3/10)
  ⎿  API Error: Request timed out.
github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.