AnthropicTips

· Intermediate

Illustration: a magnifying glass with a long handle, outlined in light grey on black.
Illustration

Managed Agents web_fetch now refuses URLs the session hasn't seen

If your agent suddenly gets url_not_in_prior_context or url_not_allowed, here is what changed on Oct 7 and how to fix it.

If a Claude Managed Agents agent stopped fetching pages around Oct 7, the cause is likely a deliberate change, not an outage. Send the URL in a user message, or add the host to allowed_hosts.

What changed#

After (Oct 7): it fetches only URLs that already appeared in the session, such as a user message, a web_search result, or a page fetched earlier. Anthropic says this "reduces the risk of data exfiltration."

Also on Oct 7: with limited networking, allowed_hosts now applies to web_search and web_fetch.

How to fix it#

  1. Error url_not_in_prior_context: put the URL in the text of a user.message event. A URL only in the system prompt, an attached document, or bash, read or MCP output does not count.
  2. Error url_not_allowed: add the host to allowed_hosts. Entries match one exact host unless they start with *., so docs.example.com is not covered by example.com.
  3. Session creation fails with a 400: an allowed_domains entry on a web tool is outside allowed_hosts. Add the host or drop the entry.
  4. Empty search results: with limited networking and an empty allowed_hosts, neither tool returns anything.
Here are the URLs you may fetch for this task: <paste URLs>. Fetch each one and summarize it.

Good to know#

  • allow_package_managers and allow_mcp_servers add no hosts for these tools.
  • Adding a host to allowed_hosts also opens it to the sandbox.
  • unrestricted networking and self-hosted environments are not limited.

Sources#

Last checked: 2026-10-12

Sources

  1. docs.anthropic.com

Something wrong? Tell the bot