[BUG] WebFetch fails silently without permission prompt when using custom ANTHROPIC_BASE_URL

Resolved 💬 4 comments Opened Feb 11, 2026 by Moskize91 Closed Apr 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using a custom API endpoint via ANTHROPIC_BASE_URL in settings.json, WebFetch operations fail with the error "Unable to verify if domain X is safe to fetch. This may be due to network restrictions or enterprise security policies blocking claude.ai."

The issues are:

  1. No permission prompt appears to allow the user to authorize the WebFetch request
  2. Claude Code automatically writes WebFetch permissions to .claude/settings.local.json, but the request still fails
  3. The error message is misleading - it's not a network/security policy issue, but a preflight check failure
  4. The workaround requires manually adding "skipWebFetchPreflight": true to settings, which is not documented or discoverable

What Should Happen?

Expected behavior:

  1. A permission prompt should appear asking the user to allow/deny the WebFetch request, regardless of the API endpoint being used
  2. OR, when using a custom ANTHROPIC_BASE_URL, Claude Code should automatically enable skipWebFetchPreflight since the preflight check may not work with proxy servers
  3. OR, at minimum, provide a clearer error message that suggests checking the skipWebFetchPreflight setting

The current behavior creates a confusing user experience where WebFetch appears broken with no clear path to resolution.

Error Messages/Logs

Steps to Reproduce

  1. Create .claude/settings.json with a custom API endpoint:

{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-token",
"ANTHROPIC_BASE_URL": "https://custom-proxy.example.com"
}
}

  1. Attempt to use WebFetch in a conversation (e.g., ask Claude to fetch a webpage)
  1. Observe the error: "Unable to verify if domain is safe to fetch..."
  1. Note that no permission prompt appears
  1. Check .claude/settings.local.json and observe that WebFetch permissions were written automatically but the request still fails
  1. Add "skipWebFetchPreflight": true to settings.json and restart VSCode
  1. WebFetch now works correctly

Environment:

  • Claude Code version: 2.1.39
  • VSCode version: [your version]
  • OS: macOS
  • Custom API endpoint: Yes (third-party proxy)

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.39

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗