Preflight Checklist
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": true to 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
skipWebFetchPreflight since the preflight check may not work with proxy servers
- 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
-
Create .claude/settings.json with 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.json and observe that WebFetch permissions were written automatically but the request still fails
-
Add "skipWebFetchPreflight": true to 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
Preflight Checklist
What's Wrong?
When using a custom API endpoint via
ANTHROPIC_BASE_URLin 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:
.claude/settings.local.json, but the request still fails"skipWebFetchPreflight": trueto settings, which is not documented or discoverableWhat Should Happen?
Expected behavior:
skipWebFetchPreflightsince the preflight check may not work with proxy serversskipWebFetchPreflightsettingThe 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 failsAdd
"skipWebFetchPreflight": trueto settings.json and restart VSCodeWebFetch now works correctly
Environment:
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