Claude Code stops WebFetch from hanging forever on a stuck server

Claude Code 2.1.268 (September 10, 2026) fixes a case where the WebFetch tool could hang indefinitely: a server that opens a response and then never finishes sending it left the tool call waiting with no way out.

A fetch now fails with a deadline error if the download — including any redirects it follows — hasn't completed within a fixed window. The default is five minutes (300000 ms):

export CLAUDE_CODE_WEBFETCH_DEADLINE_MS=60000  # fail after 60 seconds instead

Set CLAUDE_CODE_WEBFETCH_DEADLINE_MS to any plain digit string to change the deadline, or to 0 to remove the limit entirely. A decimal value or anything else that isn't plain digits is ignored and Claude Code keeps the five-minute default.

See the Claude Code sheet for the current WebFetch and environment-variable surface.