Elena Artemova · Елена Артемова · Published · Updated · Purpose of the tool · With application example.
Why a hang is more dangerous than an error
An agent that waits for a response forever looks like it is working. The task is neither completed nor rejected, a place in the queue is occupied, and the operator cannot tell whether to intervene. An error, by contrast, returns the system to an understandable state: the cause is known and a decision can be made.
The release caps waiting for an external address at a default of 300 seconds, and the CLAUDE_CODE_WEBFETCH_DEADLINE_MS variable lets you set your own limit or turn it off. The point is not the number itself. An explicit timeout turns uncertainty into an observable event that can be worked with.
What changed in release 2.1.268
Besides the timeout, the release adds a warning about an empty list of allowed networks in the gateway (access_control.allow_cidrs) and a one-time warning on the first request from a public address. A new gatewayInternalNetworks setting appears: an administrator can allow entry through the gateway for the organization's own block of public addresses.
The release also describes a self-hosted runner mode that deletes session state after completion. On isolation, it clarifies that denial rules also apply to directories reachable through a symbolic link. In head sessions, spend and volume data are now saved on exit rather than starting from zero after resumption.
Why spend should survive resumption
A spending limit makes sense only when the counter survives an interruption. If the total resets after a restart or a session resumption, the limit is quietly weakened: twenty short runs look cheaper than one long one, even though the work done is the same.
Saving totals on exit restores the original meaning of reporting. It becomes possible to match spend to a specific run, notice deviations, and explain their cause. This is not reporting for its own sake: without it you can discuss neither the budget, nor the reasons for rising cost, nor the boundaries of acceptable load.
Where limits are needed, not hope
A denial rule that is bypassed by another spelling of the same path is not a restriction. That is why the clarification about symbolic links matters: if a directory is reachable both by its real path and through a link, the check has to fire in both cases.
The same question arises with compound shell commands: if an exception matches part of a command while the whole expression is executed, the boundary stops meaning anything.
A timeout and isolation rules are useful where the agent runs without constant supervision. For a one-off call that a person is watching, simple error handling is enough. The decision about controls should follow from the consequences of an unfinished operation, not from how convenient the setup is.
Illustrative Example
A request to an external source never completes
- Task
- In an illustrative process, the agent reads an external document. The server accepts the connection but sends no response and does not close it.
- The role of the tool
- The application has a timeout configured. When it expires, the request is terminated, and the address, the wait time, and an error flag are written to the log. The session's spend total is saved on exit.
- Expected result
- The expected result is that the task finishes with a clear error instead of remaining in a waiting state indefinitely; the spend attributes the work to a specific run.
- What to check
- If the counter starts from zero after resumption, the spending limit stops restricting anything. The example is illustrative; no measurements were taken.
Claude Code is useful where waiting should end in an error and spend should belong to a specific run.
Source and reasons
Release date:
The primary source describes the instrument and its development. Conclusions about the choice - editorial analysis of the laboratory. An example explains the purpose of the tool; no measurements were carried out on it. Source date verified September 8, 2026.
Questions on the topic
Does Claude Code replace access control checks?
No. It defines the behavior of the runtime environment. The composition of data, the permissions, and the access rules are defined separately from the tool.
Why warn about an empty network list?
An empty list means the gateway is reachable more widely than the administrator assumed. The warning makes this visible before an incident.
Does every request need a timeout?
It is useful where an external system may not respond. For fast internal calls the timeout remains a safety net.