tools-web-restrictions changedmanaged-agents/tools-web-restrictions
Nearest release: v2.1.336, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+30added
Lines−0removed
From line
393
where the diff opens
First seen
6 Oct 2026
this site's first read of the page
Recorded edits25to this page, all time
The whole hunk
from line 393, old and new numbered
/
from line 393
393393 end
394394 end
395395 ```
396
397 ```hcl Terraform
398 resource "anthropic_beta_agent" "research_agent" {
399 name = "Research Agent"
400 model = { id = "claude-opus-5-5" }
401 tools = [
402 {
403 agent_toolset_20260401 = {
404 configs = [
405 {
406 web_search = {
407 allowed_domains = ["docs.example.com", "arxiv.org"]
408 user_location = {
409 country = "US"
410 timezone = "America/Los_Angeles"
411 }
412 }
413 },
414 {
415 web_fetch = {
416 blocked_domains = ["ads.example.com"]
417 max_content_tokens = 50000
418 }
419 },
420 ]
421 }
422 },
423 ]
424 }
425 ```
396426</CodeGroup>
397427
398428In a cloud environment with `limited` [networking](https://platform.claude.com/docs/en/managed-agents/environments#networking), the environment’s `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`) also applies to `web_search` and `web_fetch`. Creating a session fails with a 400 error when an enabled web tool’s `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) has an entry that is not within `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`). So does a session update that adds such an entry. To fix it, add the host to `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`) or remove the entry from `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`). At runtime, a `web_fetch` call for a URL on a host that `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`) does not match returns a `url_not_allowed` error result. `web_search` omits results from such hosts. The two lists match differently: a tool’s entry covers its subdomains, but an `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`) entry matches one exact host unless it starts with `*.`. For example, the tool entry `docs.example.com` is not within an `allowed_hosts` (java, php: `allowedHosts`; csharp, go: `AllowedHosts`) of `["example.com"]`, but it is within `["docs.example.com"]` or `["*.example.com"]`.
No line in this hunk matches that.