[BUG] Claude Code via Vertex AI is unbearably slow (4 minute delay before responding)

Status Closed — not planned
Maintainer reply ✓ Yes — ant-kurt
Activity 12 comments · opened Nov 11, 2025 · closed Feb 6, 2026
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

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 on Vertex AI, responses are very slow.

Since yesterday, I have to wait 3-4 minutes before the model responds each turn. Sometimes more. In this screenshot I wait 8 minutes and still no response.

<img width="841" height="94" alt="Image" src="https://github.com/user-attachments/assets/88f7cbf6-74d0-4be8-a9f3-fbb2888ccece" />

[!NOTE] - This does not happen when using the Claude Pro subscription, so it seems to be a connectivity problem between Vertex AI and Anthropic. - I tried switching from global region to different regions, to no avail.

What Should Happen?

Model should respond fast.

Error Messages/Logs

Steps to Reproduce

Use Claude Code with

export CLAUDE_CODE_USE_VERTEX=1

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.0.37

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

12 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/11369
  2. https://github.com/anthropics/claude-code/issues/8797
  3. https://github.com/anthropics/claude-code/issues/7291

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

asiletto · 9 months ago

it happened to me before something similar. the problem was the missing haiku model on vertex. i solved first by using ANTHROPIC_SMALL_FAST_MODEL=claude-sonnet-4 and later by enabling the required haiku model on vertex

dtinth · 9 months ago

@asiletto Thank you for the comment. Unfortunately after trying it’s still slow.

I already enabled claude-haiku-4-5 a few weeks ago. I tried setting ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5 to no avail. (Note that from documentation, ANTHROPIC_SMALL_FAST_MODEL is now deprecated.)

ant-kurt collaborator · 9 months ago

Can you run with env var ANTHROPIC_LOG=debug and flag --debug? Claude Code will display a file path that will contain request logs - this should identify if there are requests that are hanging / failing.

dtinth · 9 months ago

@ant-kurt Thank you for the pointer.

From my test, this is the first request log.

[2025-11-12 07:05:49] [DEBUG] console.log: [log_137d90] sending request {
[2025-11-12 07:05:49]   method: 'post',
[2025-11-12 07:05:49]   url: 'https://asia-southeast1-aiplatform.googleapis.com/v1/projects/********/locations/asia-southeast1/publishers/anthropic/models/claude-sonnet-4-5@20250929:streamRawPredict',
[2025-11-12 07:05:49]   options: {
[2025-11-12 07:05:49]     method: 'post',
[2025-11-12 07:05:49]     path: '/projects/********/locations/asia-southeast1/publishers/anthropic/models/claude-sonnet-4-5@20250929:streamRawPredict',
[2025-11-12 07:05:49]     body: {
[2025-11-12 07:05:49]       model: undefined,
[2025-11-12 07:05:49]       messages: [Array],
[2025-11-12 07:05:49]       system: [Array],
[2025-11-12 07:05:49]       tools: [Array],
[2025-11-12 07:05:49]       tool_choice: undefined,
[2025-11-12 07:05:49]       metadata: [Object],
[2025-11-12 07:05:49]       max_tokens: 32000,
[2025-11-12 07:05:49]       thinking: undefined,
[2025-11-12 07:05:49]       stream: true,
[2025-11-12 07:05:49]       anthropic_version: 'vertex-2023-10-16'
[2025-11-12 07:05:49]     },
[2025-11-12 07:05:49]     timeout: 600000,
[2025-11-12 07:05:49]     signal: AbortSignal {},
[2025-11-12 07:05:49]     stream: true
[2025-11-12 07:05:49]   },
[2025-11-12 07:05:49]   headers: {
[2025-11-12 07:05:49]     accept: 'application/json',
[2025-11-12 07:05:49]     'anthropic-beta': 'claude-code-20250219,interleaved-thinking-2025-05-14,web-search-2025-03-05',
[2025-11-12 07:05:49]     'anthropic-dangerous-direct-browser-access': 'true',
[2025-11-12 07:05:49]     'anthropic-version': '2023-06-01',
[2025-11-12 07:05:49]     authorization: '***',
[2025-11-12 07:05:49]     'content-type': 'application/json',
[2025-11-12 07:05:49]     'user-agent': 'claude-cli/2.0.37 (external, cli)',
[2025-11-12 07:05:49]     'x-app': 'cli',
[2025-11-12 07:05:49]     'x-goog-user-project': '********',
[2025-11-12 07:05:49]     'x-stainless-arch': 'arm64',
[2025-11-12 07:05:49]     'x-stainless-helper-method': 'stream',
[2025-11-12 07:05:49]     'x-stainless-lang': 'js',
[2025-11-12 07:05:49]     'x-stainless-os': 'MacOS',
[2025-11-12 07:05:49]     'x-stainless-package-version': '0.68.0',
[2025-11-12 07:05:49]     'x-stainless-retry-count': '0',
[2025-11-12 07:05:49]     'x-stainless-runtime': 'node',
[2025-11-12 07:05:49]     'x-stainless-runtime-version': 'v24.3.0',
[2025-11-12 07:05:49]     'x-stainless-timeout': '600'
[2025-11-12 07:05:49]   }
[2025-11-12 07:05:49] }
[2025-11-12 07:05:52] [DEBUG] console.log: [log_137d90, request-id: "req_vrtx_011CV324BsUwHq388GWqXWdk"] post https://asia-southeast1-aiplatform.googleapis.com/v1/projects/********/locations/asia-southeast1/publishers/anthropic/models/claude-sonnet-4-5@20250929:streamRawPredict succeeded with status 200 in 2296ms
[2025-11-12 07:05:52] [DEBUG] console.log: [log_137d90] response start {
[2025-11-12 07:05:52]   url: 'https://asia-southeast1-aiplatform.googleapis.com/v1/projects/********/locations/asia-southeast1/publishers/anthropic/models/claude-sonnet-4-5@20250929:streamRawPredict',
[2025-11-12 07:05:52]   status: 200,
[2025-11-12 07:05:52]   headers: {
[2025-11-12 07:05:52]     'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
[2025-11-12 07:05:52]     'cache-control': 'no-cache',
[2025-11-12 07:05:52]     'content-encoding': 'gzip',
[2025-11-12 07:05:52]     'content-type': 'text/event-stream; charset=utf-8',
[2025-11-12 07:05:52]     date: 'Wed, 12 Nov 2025 00:05:52 GMT',
[2025-11-12 07:05:52]     'request-id': 'req_vrtx_011CV324BsUwHq388GWqXWdk',
[2025-11-12 07:05:52]     server: 'hypercorn-h11',
[2025-11-12 07:05:52]     'transfer-encoding': 'chunked',
[2025-11-12 07:05:52]     vary: 'Origin, X-Origin, Referer',
[2025-11-12 07:05:52]     'x-accel-buffering': 'no',
[2025-11-12 07:05:52]     'x-content-type-options': 'nosniff',
[2025-11-12 07:05:52]     'x-frame-options': 'SAMEORIGIN',
[2025-11-12 07:05:52]     'x-vertex-ai-received-request-id': '4aba5d50-7f94-4721-b394-344e794380af',
[2025-11-12 07:05:52]     'x-xss-protection': '0'
[2025-11-12 07:05:52]   },
[2025-11-12 07:05:52]   durationMs: 2296
[2025-11-12 07:05:52] }
[2025-11-12 07:05:52] [DEBUG] console.log: response 200 https://asia-southeast1-aiplatform.googleapis.com/v1/projects/********/locations/asia-southeast1/publishers/anthropic/models/claude-sonnet-4-5@20250929:streamRawPredict Headers {} ReadableStream {}
[2025-11-12 07:05:52] [DEBUG] console.log: [log_137d90] response parsed {
[2025-11-12 07:05:52]   url: 'https://asia-southeast1-aiplatform.googleapis.com/v1/projects/********/locations/asia-southeast1/publishers/anthropic/models/claude-sonnet-4-5@20250929:streamRawPredict',
[2025-11-12 07:05:52]   status: 200,
[2025-11-12 07:05:52]   body: jJ {
[2025-11-12 07:05:52]     iterator: [AsyncGeneratorFunction: _],
[2025-11-12 07:05:52]     controller: AbortController {}
[2025-11-12 07:05:52]   },
[2025-11-12 07:05:52]   durationMs: 2300
[2025-11-12 07:05:52] }
[2025-11-12 07:05:52] [DEBUG] Stream started - received first chunk
[2025-11-12 07:05:54] [DEBUG] executePreToolHooks called for tool: Bash
[2025-11-12 07:05:54] [DEBUG] Getting matching hook commands for PreToolUse with query: Bash
[2025-11-12 07:05:54] [DEBUG] Found 0 hook matchers in settings
[2025-11-12 07:05:54] [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
  • The endpoint appears to have started responding within 2 seconds: “Stream started - received first chunk”
  • However, there is no debug log that tells when the Stream is finished.
  • After these logs, there is a silent period of around 5 minutes, followed by this log:
[2025-11-12 07:10:57] [DEBUG] console.log: [log_dca418] sending request {
[2025-11-12 07:10:57]   method: 'post',
[2025-11-12 07:10:57]   url: 'https://asia-east1-aiplatform.googleapis.com/v1/projects/********/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5:streamRawPredict',
[2025-11-12 07:10:57]   options: {
[2025-11-12 07:10:57]     method: 'post',
[2025-11-12 07:10:57]     path: '/projects/********/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5:streamRawPredict',
[2025-11-12 07:10:57]     body: {
[2025-11-12 07:10:57]       model: undefined,
[2025-11-12 07:10:57]       messages: [Array],
[2025-11-12 07:10:57]       system: [Array],
[2025-11-12 07:10:57]       tools: [],
[2025-11-12 07:10:57]       tool_choice: undefined,
[2025-11-12 07:10:57]       metadata: [Object],
[2025-11-12 07:10:57]       max_tokens: 32000,
[2025-11-12 07:10:57]       thinking: undefined,
[2025-11-12 07:10:57]       stream: true,
[2025-11-12 07:10:57]       anthropic_version: 'vertex-2023-10-16'
[2025-11-12 07:10:57]     },
[2025-11-12 07:10:57]     timeout: 600000,
[2025-11-12 07:10:57]     signal: AbortSignal {},
[2025-11-12 07:10:57]     stream: true
[2025-11-12 07:10:57]   },
[2025-11-12 07:10:57]   headers: {
[2025-11-12 07:10:57]     accept: 'application/json',
[2025-11-12 07:10:57]     'anthropic-beta': 'web-search-2025-03-05',
[2025-11-12 07:10:57]     'anthropic-dangerous-direct-browser-access': 'true',
[2025-11-12 07:10:57]     'anthropic-version': '2023-06-01',
[2025-11-12 07:10:57]     authorization: '***',
[2025-11-12 07:10:57]     'content-type': 'application/json',
[2025-11-12 07:10:57]     'user-agent': 'claude-cli/2.0.37 (external, cli)',
[2025-11-12 07:10:57]     'x-app': 'cli',
[2025-11-12 07:10:57]     'x-goog-user-project': '********',
[2025-11-12 07:10:57]     'x-stainless-arch': 'arm64',
[2025-11-12 07:10:57]     'x-stainless-helper-method': 'stream',
[2025-11-12 07:10:57]     'x-stainless-lang': 'js',
[2025-11-12 07:10:57]     'x-stainless-os': 'MacOS',
[2025-11-12 07:10:57]     'x-stainless-package-version': '0.68.0',
[2025-11-12 07:10:57]     'x-stainless-retry-count': '0',
[2025-11-12 07:10:57]     'x-stainless-runtime': 'node',
[2025-11-12 07:10:57]     'x-stainless-runtime-version': 'v24.3.0',
[2025-11-12 07:10:57]     'x-stainless-timeout': '600'
[2025-11-12 07:10:57]   }
[2025-11-12 07:10:57] }
[2025-11-12 07:10:58] [DEBUG] console.log: [log_dca418, request-id: "req_vrtx_011CV32StkUxNz2CRxFUrPNe"] post https://asia-east1-aiplatform.googleapis.com/v1/projects/********/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5:streamRawPredict succeeded with status 200 in 848ms
[2025-11-12 07:10:58] [DEBUG] console.log: [log_dca418] response start {
[2025-11-12 07:10:58]   url: 'https://asia-east1-aiplatform.googleapis.com/v1/projects/********/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5:streamRawPredict',
[2025-11-12 07:10:58]   status: 200,
[2025-11-12 07:10:58]   headers: {
[2025-11-12 07:10:58]     'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
[2025-11-12 07:10:58]     'cache-control': 'no-cache',
[2025-11-12 07:10:58]     'content-encoding': 'gzip',
[2025-11-12 07:10:58]     'content-type': 'text/event-stream; charset=utf-8',
[2025-11-12 07:10:58]     date: 'Wed, 12 Nov 2025 00:10:58 GMT',
[2025-11-12 07:10:58]     'request-id': 'req_vrtx_011CV32StkUxNz2CRxFUrPNe',
[2025-11-12 07:10:58]     server: 'hypercorn-h11',
[2025-11-12 07:10:58]     'transfer-encoding': 'chunked',
[2025-11-12 07:10:58]     vary: 'Origin, X-Origin, Referer',
[2025-11-12 07:10:58]     'x-accel-buffering': 'no',
[2025-11-12 07:10:58]     'x-content-type-options': 'nosniff',
[2025-11-12 07:10:58]     'x-frame-options': 'SAMEORIGIN',
[2025-11-12 07:10:58]     'x-vertex-ai-received-request-id': '90d67854-e87c-4d78-8e67-5ea2908a56ff',
[2025-11-12 07:10:58]     'x-xss-protection': '0'
[2025-11-12 07:10:58]   },
[2025-11-12 07:10:58]   durationMs: 848
[2025-11-12 07:10:58] }
[2025-11-12 07:10:58] [DEBUG] console.log: response 200 https://asia-east1-aiplatform.googleapis.com/v1/projects/********/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5:streamRawPredict Headers {} ReadableStream {}
[2025-11-12 07:10:58] [DEBUG] console.log: [log_dca418] response parsed {
[2025-11-12 07:10:58]   url: 'https://asia-east1-aiplatform.googleapis.com/v1/projects/********/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5:streamRawPredict',
[2025-11-12 07:10:58]   status: 200,
[2025-11-12 07:10:58]   body: jJ {
[2025-11-12 07:10:58]     iterator: [AsyncGeneratorFunction: _],
[2025-11-12 07:10:58]     controller: AbortController {}
[2025-11-12 07:10:58]   },
[2025-11-12 07:10:58]   durationMs: 851
[2025-11-12 07:10:58] }
[2025-11-12 07:10:58] [DEBUG] Stream started - received first chunk
[2025-11-12 07:10:58] [DEBUG] Permission suggestions for Bash: [
[2025-11-12 07:10:58]   {
[2025-11-12 07:10:58]     "type": "addRules",
[2025-11-12 07:10:58]     "rules": [
[2025-11-12 07:10:58]       {
[2025-11-12 07:10:58]         "toolName": "Bash",
[2025-11-12 07:10:58]         "ruleContent": "bundle exec rspec:*"
[2025-11-12 07:10:58]       }
[2025-11-12 07:10:58]     ],
[2025-11-12 07:10:58]     "behavior": "allow",
[2025-11-12 07:10:58]     "destination": "localSettings"
[2025-11-12 07:10:58]   }
[2025-11-12 07:10:58] ]
[2025-11-12 07:11:04] [DEBUG] Getting matching hook commands for Notification with query: permission_prompt
[2025-11-12 07:11:04] [DEBUG] Found 0 hook matchers in settings
[2025-11-12 07:11:04] [DEBUG] Matched 0 unique hooks for query "permission_prompt" (0 before deduplication)

Followed by 7 minutes of silence.

Hope it is useful in finding the root cause 🙏

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.

dtinth · 8 months ago

It still happens intermittently. It happens 2 days out of 7 days past week.

pr0met · 8 months ago

I also encounter this issue. It's more permanent rather than intermittent in my case.

narze · 7 months ago

The issue is still not fixed, by today I tried with simple prompt and claude froze for 5 minutes without any tokens used

<img width="988" height="361" alt="Image" src="https://github.com/user-attachments/assets/e43f6a7f-332d-4dde-9d5d-2112443c6eef" />

While using the same Vertex AI token with opencode does not have any issues

github-actions[bot] · 6 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 · 6 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.