“Request timed out” in Claude Code on Mac

Claude Code prints Request timed out when the API does not respond before the connection deadline. The default request timeout is 10 minutes.

Fix this with your agentCopies a prompt for Claude Code, Codex or any agent that can use Terminal.

My Mac has this problem: “Request timed out” in Claude Code on Mac. Read https://kilobat.app/guides/claude-code-request-timed-out.md and work through it with me. Install the Kilobat CLI if it’s missing: brew install seifip/kilobat/kilobat. Run the guide’s Terminal and kilobat checks yourself and tell me what you find. List the steps only I can do. Ask before you change any setting.

Applies to: Claude Code in a terminal on all current macOS versions.Checked: 29 October 2026

Symptoms

  • Claude Code prints Request timed out after a long wait.
  • It happens on slow networks, through proxies, or on large requests.
  • Some retries work.

Likely causes

  • A slow network or proxy. The documentation says that a slow network or proxy can cause it.
  • A stalled connection. A VPN or firewall can hold packets, so no reply arrives.
  • A large request. A non-streaming request keeps a 300-second limit in a local session.
  • A timeout of zero on an old version. On versions before v2.1.305, setting API_TIMEOUT_MS to 0 can make every request fail.

How to check

  1. Test the API host from the same shell.

    curl -I https://api.anthropic.com
  2. Check your version.

    claude --version
  3. Show the proxy variables.

    env | grep -i proxy
  4. Run the setup checks inside Claude Code.

    /doctor

How to fix it

  1. Retry the request.

  2. On a slow network or proxy, raise the timeout.

    export API_TIMEOUT_MS=900000
  3. Update Claude Code if you set the timeout to 0.

  4. If timeouts are frequent, test another network and the VPN.

With Kilobat

  1. Kilobat's connection doctor tests the API host layer by layer. It names the layer that fails or runs slow.

    kilobat why https://api.anthropic.com
  2. These Kilobat checks are free. AI agents run them through MCP with diagnose_connection and diagnose_network. See Find why one site or API won't connect.

Questions

What is the default timeout?

The Claude Code documentation gives 10 minutes for the request timeout.

Does API_TIMEOUT_MS=0 turn off every deadline?

No. The first-byte deadline and the body idle timeout stay on.

Sources

Checked on 29 October 2026.