Claude Code on Vertex AI needs an enabled Google Cloud project, access to the intended Claude model and credentials available to the application. A successful gcloud command is only one part of that setup: the CLI’s own login and Application Default Credentials are separate configurations.
Anthropic’s deployment documentation now calls this route Google Cloud’s Agent Platform, while its configuration still uses the Vertex-named environment variables below. Use the actual project and region approved for your deployment.
On this page
Understand which credentials the application reads
Google’s Application Default Credentials documentation gives this search order:
- The file referenced by
GOOGLE_APPLICATION_CREDENTIALS. - The local file created by
gcloud auth application-default login. - Credentials from an attached service account.
That order explains a common diagnostic trap. If the environment points at a credential file, changing the local ADC login may not change the credentials an application finds first.
Before replacing credentials, decide which authentication route the deployment is meant to use. Do not delete an organisation-managed configuration simply because it differs from a laptop tutorial.
Set up local ADC for a development machine
For the local user-credential route, Google documents:
gcloud auth application-default login
Complete the authentication flow. Google’s command reference says this writes credentials for ADC and does not change accounts configured through gcloud auth login. Running it again overwrites the earlier local ADC credentials.
Keep that distinction visible in your setup notes. “I signed in to Google Cloud” is too ambiguous to explain whether a failing application is using the expected credentials.
Google also says not to set GOOGLE_APPLICATION_CREDENTIALS when intending to use the local file produced by this command. If that variable is already managed by your organisation, confirm its intended role rather than clearing it blindly.
Configure the project and provider
Anthropic documents the following configuration pattern:
export CLAUDE_CODE_USE_VERTEX=1
export ANTHROPIC_VERTEX_PROJECT_ID=your-project-id
export CLOUD_ML_REGION=global
claude
Replace your-project-id with the deployment project. The region is an example supported by the documented configuration; availability still depends on the selected model and endpoint. Do not copy another team’s region without checking your own model access.
The deployment guide also requires the platform API and model access to be enabled in the project. Those account-side steps must be complete before a local environment can invoke the model.
Verify the effective configuration
Anthropic documents /status for checking the provider, project, region and resolved model:
/status
Compare the values with the deployment you intended. This is a verification step for readers to run, not a claim that this publication tested your cloud account.
| Check | A mismatch suggests |
|---|---|
| Provider | Provider variables may not reach the process |
| Project | The explicit Claude Code project setting needs review |
| Region | The requested endpoint and model availability need comparison |
| Credential route | An environment file may take precedence over local ADC |
| Model | The effective selection differs from the intended deployment |
Change one layer at a time. A project correction, a new ADC login and a model change made together can hide which adjustment resolved an error.
Keep production credentials separate from laptop setup
Google recommends attached service-account credentials for workloads running on Google Cloud. It warns that service-account keys carry security risks. A local browser login is therefore not a universal production-deployment recipe.
Ask the deployment owner which identity should run the workload and which permissions it needs. Keep the code repository free of credential files and access tokens. A setup guide should record the intended identity type and non-secret configuration, not distribute its secrets.
For the other cloud-provider route, see Claude Code on Amazon Bedrock. For local project boundaries, see Claude Code permissions and sandboxing.





