{"version":"2.1.323","anchor":"webfetch-can-be-turned-off-with-claude-code-disable-web-fetc","canonical_anchor":"webfetch-can-be-turned-off-with-claude-code-disable-web-fetc","heading":"WebFetch can be refused up front, including with CLAUDE_CODE_DISABLE_WEB_FETCH","tier":"use","area":"WebFetch","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/webfetch-can-be-turned-off-with-claude-code-disable-web-fetc","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### WebFetch can be refused up front, including with CLAUDE_CODE_DISABLE_WEB_FETCH\n\nSetting `CLAUDE_CODE_DISABLE_WEB_FETCH` turns WebFetch off with a clear message, and WebFetch now checks for refusals before reading the URL\n\n**What**\n\nWebFetch is the tool Claude uses to read a web page. Environment variables are named values set outside Claude Code that change how it works.\n\n- When `CLAUDE_CODE_DISABLE_WEB_FETCH` is set, WebFetch is refused with the message \"WebFetch is turned off by CLAUDE_CODE_DISABLE_WEB_FETCH.\" Otherwise the existing policy check decides.\n\n- A second check refuses with that message and the reason `web_fetch_refused` even when an earlier check had passed.\n\n- Before reading the URL, WebFetch now asks a check whether to refuse. If it returns a message, the call is refused with reason 'refused' and error code 2. Before, the URL was read straight away.\n\nThe tool's description, as captured under this release, is unchanged at 1,608 characters.\n\n**Why**\n\nYou or your organisation can switch WebFetch off with one variable, and Claude gets a clear reason instead of a failed fetch.\n\n- Area: WebFetch\n- Names: `CLAUDE_CODE_DISABLE_WEB_FETCH`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 1\/5\n- Scope: both\n- Heads-up: no"}