---
title: "“Request timed out” in Claude Code on Mac · Kilobat Guides"
url: "https://kilobat.app/guides/claude-code-request-timed-out"
description: "Claude Code on your Mac prints Request timed out. The API did not answer before the deadline. Check the network, a proxy and the timeout setting."
---

# “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 agent**Copies 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](https://kilobat.app/guides/recipes/why-cant-it-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

- [Claude Code: Error reference](https://code.claude.com/docs/en/errors.md)
- [Claude Code: Enterprise network configuration](https://code.claude.com/docs/en/network-config.md)

Checked on 29 October 2026.

## Related guides

- [“Unable to connect to API” in Claude Code on Mac](https://kilobat.app/guides/claude-code-unable-to-connect-to-api): Claude Code prints Unable to connect to API when a request does not reach api.anthropic.com.
- [ERR_CONNECTION_TIMED_OUT in Chrome on Mac](https://kilobat.app/guides/err-connection-timed-out): Chromium describes this error as: “A connection attempt timed out.” Chrome found the address, but the server did not answer in time.
- [Bufferbloat: calls lag when the network is busy](https://kilobat.app/guides/bufferbloat-mac): Bufferbloat is latency that network devices add when they hold too much data in their buffers.
- [Test for packet loss on a Mac with ping](https://kilobat.app/guides/packet-loss-mac): Packet loss makes calls break up and pages stall.
