[BUG] WebFetch downloads content successfully but returns 404 errors to assistant when using Vertex AI

Status Closed — not planned
Maintainer reply None cached
Activity 10 comments · opened Nov 1, 2025 · closed Jan 31, 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 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

  1. Configure Claude Code to use Vertex AI (set environment variables as shown above)
  2. Start a conversation with Claude Code
  3. Request the assistant to fetch a website using WebFetch
  4. 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_

View original on GitHub ↗

10 Comments

github-actions[bot] · 10 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/7754

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

stevenvo · 10 months ago

the #7754 was closed without solution.

wojtiku-ciq · 9 months ago

I also face this issue regularly.

stevenvo · 9 months ago

the only current workaround solution that i know is to system prompt claude to use curl instead of webfetch

bobbravo2 · 9 months ago

We're seeing this issue, too. Workaround using cURL seems to be our only way

github-actions[bot] · 8 months ago

This 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.

stevenvo · 8 months ago

the issue still persists. And now sandbox mode even makes the curl more tricky as dns resolution is blocked by default.

github-actions[bot] · 7 months ago

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.

marcindulak · 7 months ago

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.

github-actions[bot] · 6 months ago

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.