[BUG] WebFetch downloads content successfully but returns 404 errors to assistant when using Vertex AI
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 Claude Code with Google Vertex AI, the WebFetch tool shows successful downloads in the UI (200 OK status) but returns 404 errors in function results to the assistant, preventing the AI from accessing or analyzing the fetched content.
Environment:
- Claude Code Version: 2.0.31
- Platform: macOS (Darwin 24.6.0)
- Model: Claude Sonnet 4.5 (claude-sonnet-4-5@20250929)
- API Provider: Google Vertex AI
- Region: us-central1 / global
Configuration:
CLAUDE_CODE_USE_VERTEX=1
CLOUD_ML_REGION=us-central1
CLAUDE_MODEL=claude-sonnet-4-5@20250929
Actual Behavior:
What the user sees in UI:
Fetch(https://example.com)
⎿ Received 513 bytes (200 OK)
Fetch(https://www.anthropic.com)
⎿ Received 266.4KB (200 OK)
Fetch(https://news.ycombinator.com)
⎿ Received 33.9KB (200 OK)
What the assistant receives in function results:
API Error: 404 {"error":{"code":404,"message":"Requested entity was not found.","status":"NOT_FOUND"}}
What Should Happen?
Expected Behavior:
- WebFetch should download the content AND return it to the assistant in function results
- Assistant should be able to analyze and summarize the fetched content
Error Messages/Logs
API Error: 404 {"error":{"code":404,"message":"Requested entity was not found.","status":"NOT_FOUND"}}
Steps to Reproduce
- Configure Claude Code to use Vertex AI (set environment variables as shown above)
- Start a conversation with Claude Code
- Request the assistant to fetch a website using WebFetch
- Observe the UI output vs function results
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.31
Platform
Google Vertex AI
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
10 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
the #7754 was closed without solution.
I also face this issue regularly.
the only current workaround solution that i know is to system prompt claude to use curl instead of webfetch
We're seeing this issue, too. Workaround using
cURLseems to be our only wayThis issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
the issue still persists. And now sandbox mode even makes the curl more tricky as dns resolution is blocked by default.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.