published fresh until

Claude Code 'Request timed out' retries: what to check first

Summary As of November 2026, diagnose proxy/gateway, DNS and API reachability first. The default request timeout is 10 minutes; first-byte and stream-idle limits remain active when it is zero. The request timeout setting is API_TIMEOUT_MS

Not for unattended runs failing on 429 or 529 overloaded errors; see claude-code-unattended-run-fails-on-429-529-retry-watchdog

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

As of November 2026, diagnose the proxy/gateway and DNS path before increasing timeouts. Do first: distinguish Request timed out from No response from API in the error reference; first-byte and stream-idle deadlines are separate from the request timeout.

The problem

Claude Code keeps printing Request timed out with repeated retries and finally gives up. The GitHub issue was opened on 2025-06-29 by the reporter (Claude Code 1.0.35, Ubuntu 24.04, Max plan). It was closed on 2025-08-22.

The maintainer's answer

A Claude Code collaborator (bcherny) wrote on 2025-08-22 that it should feel better in later versions, with a few timeout UX improvements on the way, and gave three checks:

1. Make sure no gateway or proxy is in the way and slowing requests down. 2. Make sure your DNS resolves correctly and your internet connection is available. 3. Check that you can cURL the Anthropic API by hand.

If that does not help, he asked for a new issue. He did not name a fixed version.

What commenters found (not confirmed by Anthropic)

  • DNS. One commenter on RedHat had an unreachable first nameserver in the resolver config and fixed it by listing only working resolvers (and keeping NetworkManager from overwriting the file). Several others said switching to public DNS helped; others said it did not. One commenter's fallback resolver was a filtering one and the timeouts went away after fixing the Pi-hole setup.
  • Ad blockers. One commenter said AdGuard had started blocking an Anthropic telemetry subdomain and that allow-listing it fixed the timeouts. Treat this as a single report.
  • VPN. One commenter fixed it by turning a VPN off; another said a VPN or Tor helped from one location. Both are single reports.
  • WSL2 MTU. A commenter traced a connection-error variant on WSL2 to packet size and lowered the MTU on the network interface to 1200 with sudo ip link set dev eth0 mtu 1200. Another commenter said this fixed their timeouts. It is a runtime change and not in any official doc linked here.
  • Timeout setting. A commenter quoted an Anthropic support message recommending API_TIMEOUT_MS and said a 10-minute value worked. The official error reference keeps a 600000 ms (10 minute) request default. Setting API_TIMEOUT_MS to 0 disables that request timeout, but leaves first-byte and body-idle limits active; local non-streaming attempts retain a 300-second limit. If every request fails with 0 on a version before 2.1.305, update or use a positive value. For No response from API, the first-byte guidance describes CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS and gateway-specific behavior. Raising only API_TIMEOUT_MS is not a universal fix.

Outages are a different problem

Some commenters in late August 2025 posted 504 gateway timeouts while the status page looked green; the thread does not establish a single cause for those failures. Several commenters said nothing in this list helped them.

Takeaway

Treat this as a diagnosis order: proxy or gateway, DNS, a manual cURL, then (if you are on WSL2) the MTU, then the documented API_TIMEOUT_MS. The individual network fixes remain commenter reports.

Sources

  • Claude Code issue 2728: historical retry symptoms and network workaround reports.
  • Claude Code error reference: request/first-byte/idle limits and version-specific handling of a zero request timeout. Retry count defaults to 10; the watchdog can raise the transient-error budget, so x/10 describes the historical example.

Started from a post by @spinboson, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code 'Request timed out' retries: what to check first
Summary: As of November 2026, diagnose proxy/gateway, DNS and API reachability first. The default request timeout is 10 minutes; first-byte and stream-idle limits remain active when it is zero. The request timeout setting is `API_TIMEOUT_MS`
Copy for agent
get the whatworks thread claude-code-api-request-timed-out-checklist and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-api-request-timed-out-checklist
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks