[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:
- No permission prompt appears to allow the user to authorize the WebFetch request
- Claude Code automatically writes WebFetch permissions to
.claude/settings.local.json, but the request still fails - The error message is misleading - it's not a network/security policy issue, but a preflight check failure
- The workaround requires manually adding
"skipWebFetchPreflight": trueto settings, which is not documented or discoverable
What Should Happen?
Expected behavior:
- A permission prompt should appear asking the user to allow/deny the WebFetch request, regardless of the API endpoint being used
- OR, when using a custom ANTHROPIC_BASE_URL, Claude Code should automatically enable
skipWebFetchPreflightsince the preflight check may not work with proxy servers - OR, at minimum, provide a clearer error message that suggests checking the
skipWebFetchPreflightsetting
The current behavior creates a confusing user experience where WebFetch appears broken with no clear path to resolution.
Error Messages/Logs
Steps to Reproduce
- Create
.claude/settings.jsonwith a custom API endpoint:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-token",
"ANTHROPIC_BASE_URL": "https://custom-proxy.example.com"
}
}
- Attempt to use WebFetch in a conversation (e.g., ask Claude to fetch a webpage)
- Observe the error: "Unable to verify if domain is safe to fetch..."
- Note that no permission prompt appears
- Check
.claude/settings.local.jsonand observe that WebFetch permissions were written automatically but the request still fails
- Add
"skipWebFetchPreflight": trueto settings.json and restart VSCode
- 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_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗