Best Known Issues (BKIs) and limitations
Concrete failure modes that come up repeatedly with the Agent Platform — symptoms and fixes. Read this when the symptom in front of you matches one of these patterns; it's faster than walking the full diagnostic flow.
Table of Contents
- 1. ReasoningEngine startup: project ID conversion (Lines 54-76)
- 2. ReasoningEngine startup: Assembly Service init (Lines 77-89)
- 3. Private-preview limit: one RE per project (Lines 90-102)
- 4. 403 / Egress not authorized — missing authz_policy or UAP binding
- 5. IAP ENFORCE / Blanket DENY blocks Agent Runtime startup
- 6. Self-signed / Private CA destinations (Lines 144-156)
- 7. Principal Access Boundary (PAB) override (Lines 157-188)
- 8. Gateway proxy denies before IAP (Lines 189-239)
- 9. Cross-Project Gateway import failing (Code 13) (Lines 240-295)
- 10. Cross-Project Runtime-to-Gateway Binding Failures
- 11. RE Container Crash: Dependency Mismatch (Lines 296-318)
- 12. mTLS Egress Failure: Expired Cert (Lines 319-340)
- 13. Model Armor integration fails with 500 / Perm Denied (Lines 341-395)
- 15. Egress Blocked: Empty Registry IAM Policy (Lines 396-432)
- 16. RE deployment fails with Code 13 (Lines 433-480)
- 17. RE outbound SSL handshake failure (Egress Gateway) (Lines 481-527)
- 18. VPC-SC Perimeter Blocks Provisioning (Lines 528-604)
- 19. PSC Subnet Exhaustion Fails Deployment (Lines 605-644)
- 20. Config Validation Failure: Missing API (Lines 645-679)
- 21. Agent Identity Egress to Cloud Run/Funcs (JWT issue) (Lines 680-725)
- 22. Agent deployed but not visible in Registry
- 23. Telemetry Egress Blocked by Egress Gateway
- 24. UAP Org Policy Blocker (disableAccessPolicyBinding)
- 25. UAP Policy Binding Destruction Race Condition
- 26. Agent Gateway Multi-Registry Validation Error
- 27. CEL Null Dereference Crash on Non-Tool MCP Methods
- 28. ACT ALL_TRAFFIC Silent Outbound Hang (Missing Cloud NAT)
- 29. CCFE Agent Gateway Mutation Concurrency Lock (HTTP 409 ABORTED)
- 30. Dangling Reference on ACT Deletion (FROM_AGENT_GATEWAY)
- 31. Reasoning Engine Deletion Preconditions (Active Sessions)
- 32. REST API Path Matching Gotcha (.json and Query Strings)
- 33. Secure Web Proxy (SWP) & Policy-Based Routing (PBR) Egress Failures
1. ReasoningEngine startup: "Failed to convert project number to project ID"
Symptom:
- Log name:
aiplatform.googleapis.com/reasoning_engine_stderr - Error text:
google.api_core.exceptions.Unknown: NoneorFailed to convert project number to project ID. - Happens during ReasoningEngine startup, before any user code runs.
Cause: The ReasoningEngine's system identity (the principal set it runs
under) lacks resourcemanager.projects.get, which the Agent Runtime SDK needs
to resolve the project name during init.
Fix: Grant roles/browser to the ReasoningEngine principal set:
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="principalSet://agents.global.org-${ORG_ID}.system.id.goog/attribute.platformContainer/aiplatform/projects/${PROJECT_NUMBER}" \
--role="roles/browser"2. ReasoningEngine startup: "Assembly Service failed to initialize"
Symptom: [1099] ERROR: Assembly Service failed to initialize. in
reasoning_engine_stderr.
Cause: Generic "init failed" — usually a downstream symptom of either #1
(project-number resolution) or a runtime error in the agent's set_up() method.
Investigation: Pull all severity=ERROR from reasoning_engine_stderr
around the same timestamp; the actual root cause is in the same window.
3. Private-preview limit: one Agent Runtime instance per project bonded to an Agent Gateway
Symptom: Updating an Agent Runtime instance to use an Agent Gateway fails
with Internal error encountered or The specified parameters are invalid.
Cause: During the private preview, a project can have only one active ReasoningEngine ↔ AgentGateway bonding. A second bonding attempt fails.
Fix: Either delete the existing bonded RE / AGW, or reuse the existing AGW for any new REs.
4. 403 / "Egress request is not authorized" — missing authz_policy or UAP binding {#egress-not-authorized}
Symptom: Audit logs show GatekeeperAuthorizer.AuthorizeUser returning
Permission Denied for iap.webServiceVersions.egressViaIAP or
iap.googleapis.com/resources.egressViaIAP.
Cause:
- Missing AuthzPolicy Attachment: The IAP authz extension exists, but no
authz_policytargets the specific Agent Gateway (target.resources[]). - Missing or Misconfigured UAP Binding (Policy V2): When the gateway uses
iapPolicyVersion: "V2", noPolicyBindingbinds anAccessPolicyto the target CRM node (//cloudresourcemanager.googleapis.com/projects/${PROJECT_NUMBER}), or the target resource was specified using the string project ID instead of the numeric project number.
Fix:
Verify the
authz_policytargets the gateway:gcloud network-security authz-policies list --location=${LOCATION}If using UAP, verify the policy binding targets the numeric project number:
gcloud iam policy-bindings list \ --target-resource="//cloudresourcemanager.googleapis.com/projects/${PROJECT_NUMBER}" \ --location=global
5. IAP ENFORCE mode / Blanket DENY blocks Agent Runtime startup
Symptom: Agent Runtime instances fail to deploy or start, with 403s or
connection resets in startup logs (reasoning_engine_stderr).
Cause:
- Default-Deny without Bootstrap Endpoints: With IAP in
ENFORCEmode on the Agent Gateway, all egress is denied by default — including bootstrap calls the agent runtime makes totelemetry.mtls.googleapis.com,cloudresourcemanager,aiplatform,logging,monitoring, etc. - Blanket Unregistered DENY in UAP: An Org or Folder Admin created an
explicit
effect: DENYrule on(destination.is_registered == false). Because DENY has absolute precedence and cannot be overridden by project-level rules, Reasoning Engine boot traffic totelemetry.mtls.googleapis.comis dropped immediately.
Fix:
- Ensure all required monitoring/telemetry endpoints
(
telemetry.mtls.googleapis.com,monitoring.googleapis.com,trace.mtls.googleapis.com,cloudtrace.googleapis.com) are registered in the Agent Registry and permitted by policy. - Never create a blanket DENY on
destination.is_registered == false. Rely on gateway default-deny instead. - Set IAP to
DRY_RUN(iamEnforcementMode: "DRY_RUN") to observe failing destinations without blocking container initialization.
6. Self-signed / Private CA destinations not supported (early versions)
Symptom: Agent fails to connect to internal MCP servers or tools that present self-signed or Private CA-issued certificates.
Cause: In private-preview / early Agent Gateway, the gateway's egress proxy can't validate self-signed cert chains.
Mitigation: Use publicly-trusted CA certificates for internal MCP servers, or wait for the platform enhancement that adds Private CA trust-anchor support.
7. Principal Access Boundary (PAB) policies overriding IAM Allow
Symptom: Agent identity has the right roles bound (roles/iap.egressor,
roles/aiplatform.user, etc.) and the resource is registered correctly, but
calls still 403.
Cause: A Principal Access Boundary policy is restricting the scope of resources the principal can access. PAB policies take precedence over IAM Allow policies — even a correct binding does nothing if a PAB blocks the target resource.
Investigation: List PAB policies and their bindings for the agent identity:
# List org-wide PAB policies
gcloud iam principal-access-boundary-policies list \
--organization="${ORGANIZATION_ID}" --location=global
# Find what's bound to a specific principal set / agent identity
gcloud iam policy-bindings search-target-policy-bindings \
--project="${PROJECT_ID}" --target="${PRINCIPAL_SET}"
# Inspect a specific PAB
gcloud iam principal-access-boundary-policies search-policy-bindings "${PAB_POLICY_ID}" \
--organization="${ORGANIZATION_ID}" --location=globalFix: Either widen the PAB to include the destination resource, or remove the PAB binding from the agent's principal set if it shouldn't apply.
8. Gateway proxy denies the request before IAP runs
Symptom: Requests fail with no IAP audit log entry — IAP never saw them.
Cause: The gateway's underlying egress proxy (a Google-managed Secure Web Proxy instance) enforces a deny-by-default posture before IAP authz runs. When the proxy itself denies a call, IAP doesn't get a chance to evaluate, so no IAP audit-log entry is produced for that call.
Specific Case: CONNECT to PSC VIP (240.0.0.2:443) with Default Denied In
environments using Private Service Connect (PSC), clients resolve Google APIs to
internal VIPs (e.g., 240.0.0.2:443). Consequently, the outer tunnel request is
logged as CONNECT 240.0.0.2:443 in the proxy logs. This is expected
behavior. Because TLS inspection is enabled on the Secure Web Proxy (SWP), the
proxy intercepts this CONNECT tunnel and inspects the TLS handshake to extract
the actual SNI hostname (e.g., us-central1-aiplatform.googleapis.com) for
routing and policy evaluation. If the extracted SNI hostname is not
registered in the Agent Registry, the proxy cannot match the route. The proxy
then denies the connection, logging a 403 on the CONNECT request with
hostname: 240.0.0.2:443 and matching the default_denied rule.
Investigation: Pull the gateway proxy load-balancer logs:
jsonPayload.@type="type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry"
resource.labels.gateway_type="SECURE_WEB_GATEWAY"Alternative (CLI Fallback):
gcloud logging read 'jsonPayload.@type="type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry" AND resource.labels.gateway_type="SECURE_WEB_GATEWAY"' --project=PROJECT_ID --limit=50Key fields to inspect in the match:
httpRequest.status: Look for403.jsonPayload.enforcedGatewaySecurityPolicy.hostname: Look for240.0.0.2:443(expected PSC CONNECT target).jsonPayload.enforcedGatewaySecurityPolicy.matchedRules: Look fordefault_denied.jsonPayload.mtls.clientCertChainVerified: Oftenfalsebecause the handshake was interrupted on route match failure.
Fix: Identify the inner hostname the agent was attempting to reach (e.g.
us-central1-aiplatform.googleapis.com) and ensure ALL required hostname
permutations are registered in the Agent Registry. The proxy relies on these
registry entries to dynamically build its routing table.
9. Cross-Project Agent Gateway import / creation failing (Code 13 Internal Error)
Symptom:
- Happening during
gcloud network-services agent-gateways importor creation. - CLI rejects the command with a synchronous error:
ERROR: (gcloud.network-services.agent-gateways.import) { "code": 13, "message": "an internal error has occurred" } - Gateway YAML specifies cross-project infrastructure targets (e.g. a PSC network attachment or target DNS peering network residing inside another network host project, e.g., Project B).
Cause: To satisfy Google Cloud's cross-project resource isolation controls,
the API control-plane must validate that the gateway's billing project is
authorized to map the target resource. The validation is executed under the
Agent Gateway Control Plane Service Agent identity:
service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com
If this service agent lacks read permissions on the target network project, or
if the network configuration itself is invalid, the validation fails, causing
the import command to exit with a synchronous Code 13 internal error.
Specifically, the following network configuration rules must be honored:
- VPC Network Mismatch: The VPC network containing the PSC network
attachment and the target network specified in the DNS peering configuration
(
dnsPeeringConfig.targetNetwork) must be the exact same VPC network. If they point to different VPC networks, the configuration validation fails. - DNS Zone Validation Failure: The domains specified in
dnsPeeringConfig.domainsmust exist as private DNS zones (e.g., private zones or forwarding zones) in the target VPC network. If they do not exist, validation fails.
Investigation:
- Verify the caller (user EUC) has
roles/compute.networkViewerandroles/dns.reader(or basic Owner/Editor/Viewer roles) on the target network host project. - Check if the network attachment
connectionPreferenceis set toACCEPT_AUTOMATIC. - Check the IAM policy in the target network project. Verify if the gateway's
control-plane service agent is missing the required roles:
service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.comNote: The egress proxy service agent (service-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com) does not require these permissions manually granted on the host project. - Verify that the PSC network attachment's network matches the DNS peering target network exactly.
- Check if all domains specified under
dnsPeeringConfig.domainscorrespond to existing private DNS zones associated with the target network VPC (e.g., they align with the DNS forwarding zone, or use.if a catch-all peering zone is configured).
Fix: You must grant the control-plane service agent the required validation permissions inside the target network host project, ensure the target operator has required reader roles, and align the VPC networks and domains in the configuration:
Grant
roles/compute.networkUserto validate the PSC network attachment:gcloud projects add-iam-policy-binding TARGET_NETWORK_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com" \ --role="roles/compute.networkUser"Grant
roles/dns.peerto validate the DNS peering target:gcloud projects add-iam-policy-binding TARGET_NETWORK_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com" \ --role="roles/dns.peer"Ensure the operator has
roles/compute.networkViewerandroles/dns.readeron the target network project:gcloud projects add-iam-policy-binding TARGET_NETWORK_PROJECT_ID \ --member="user:OPERATOR_EMAIL" \ --role="roles/compute.networkViewer" gcloud projects add-iam-policy-binding TARGET_NETWORK_PROJECT_ID \ --member="user:OPERATOR_EMAIL" \ --role="roles/dns.reader"Configure the gateway YAML definition such that the VPC network containing the network attachment match the target network for DNS peering (
dnsPeeringConfig.targetNetwork) exactly.Ensure any domain configured under
dnsPeeringConfig.domainsis registered as a private DNS zone in the target VPC network (e.g. matching the exact peered zone or using.for root/catch-all peering).
10. Cross-Project Runtime-to-Gateway Binding Failures: PERMISSION_DENIED, INVALID_ARGUMENT, or CAA Token Suppression
Symptom:
- Symptom A (Deployer PERMISSION_DENIED): Calling Vertex AI
client.agent_engines.create(...)or REST API in Project 1 (AE_PROJECT_ID) referencing an Agent Gateway in Project 2 (AGW_PROJECT_ID) fails synchronously with:ERROR: (gcloud.ai.reasoning-engines.create) PERMISSION_DENIED: Permission 'networkservices.agentGateways.use' denied on resource '//networkservices.googleapis.com/projects/AGW_PROJECT_ID/locations/REGION/agentGateways/GATEWAY_NAME' - Symptom B (Control-Plane INVALID_ARGUMENT): Deployment fails with:
INVALID_ARGUMENT: Agent Gateway project in spec.deployment_spec.agent_gateway_config.agent_to_anywhere_config.agent_gateway must match the Vertex AI project.or region mismatchINVALID_ARGUMENT: Agent Gateway location in spec... must match the Vertex AI location. - Symptom C (CAA 401 Unauthenticated Egress): Runtime container deploys
successfully, but egress requests to external endpoints or MCP tools fail
immediately with:
Error Code: "401", Error Details: "Context-Aware Access requirements are not met"orRequest had invalid authentication credentials. - Symptom D (Proxy 403 PERMISSION_DENIED on MCP Tool / Service Name):
Egress through the gateway fails with HTTP 403
PERMISSION_DENIED, even thoughroles/iap.egressorwas granted to the friendly service name in Agent Registry. - Symptom E (Unsupported Folder-Level principalSet): Policy binding using
principalSet://TRUST_DOMAIN/attribute.platformContainer/aiplatform/folders/FOLDER_NUMBERfails silently or is rejected as an invalid principal identifier. - Symptom F (VPC-SC Perimeter Block): Egress calls fail with
VPC_SERVICE_CONTROLS_VIOLATIONacross project boundaries.
Cause:
- Cross-Project Feature Rollout & Colocation Invariants: Following the
EnableCrossProjectAgentGateway_Default_Launchrollout, cross-project binding (spec.deploymentSpec.agentGatewayConfig.agentToAnywhereConfig.agentGateway) is supported. However, both the runtime and the gateway must reside in the exact same Google Cloud region (e.g.us-central1). Cross-region bindings are rejected withINVALID_ARGUMENT. Furthermore, all runtimes in a given project and region must bind to the identical gateway instance. - Missing Deployer and Service Agent IAM Permissions:
- The deploying principal (user EUC, Cloud Build SA, or pipeline
identity) must have
networkservices.agentGateways.useandnetworkservices.agentGateways.geton the gateway inAGW_PROJECT_ID. - The runtime project's Vertex AI Service Agent
(
service-AE_PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com) must holdroles/networkservices.viewer(or custom roleae_agw_cross_project_sawithnetworkservices.agentGateways.getandnetworkservices.operations.get) onAGW_PROJECT_ID.
- The deploying principal (user EUC, Cloud Build SA, or pipeline
identity) must have
- Context-Aware Access (CAA) Token Suppression: By default, Google Cloud
SDKs and
google-authenforce bound token protection. In cross-project egress, bound token requirements reject requests unless the runtime explicitly sets the environment variableGOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES: False. - Friendly Service Name vs. Server-Generated Resource ID Trap: In Agent
Registry, services, endpoints, and mcp-servers are written via
gcloud agent-registry services create. However, IAP authorization (gcloud iap web add-iam-policy-binding) must bind to the server-generated resource ID (agentregistry-00000000-..., extracted from theregistryResourcefield), NOT the friendly service name ([MCP_SERVICE_NAME]). Binding to the friendly service name attaches the policy to a non-existent IAP resource. - SPIFFE principalSet Syntax Limitation:
attribute.platformContainer/aiplatform/folders/FOLDER_NUMBERis not an indexed attribute in IAM SPIFFE URI evaluation. Scoping must strictly use project-level syntax (attribute.platformContainer/aiplatform/projects/PROJECT_NUMBER) or trust-domain-wide syntax (principalSet://TRUST_DOMAIN/*), or use Principal Access Boundary (PAB) policies. - VPC Service Controls Perimeter Boundary: If Project 1 (
AE_PROJECT_ID) and Project 2 (AGW_PROJECT_ID) reside in different perimeters, perimeter bridging or bidirectional ingress/egress rules coveringaiplatform.googleapis.com,networkservices.googleapis.com, andagentregistry.googleapis.comare required.
Investigation:
Check Deployer Permissions on Gateway:
gcloud network-services agent-gateways describe GATEWAY_NAME \ --project=AGW_PROJECT_ID \ --location=REGIONIf this fails with
PERMISSION_DENIED, the deployer lacks read/use permissions.Check Vertex AI Service Agent IAM on Gateway Project:
gcloud projects get-iam-policy AGW_PROJECT_ID \ --flatten="bindings[].members" \ --filter="bindings.members:service-AE_PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com" \ --format="table(bindings.role)"Verify that
roles/networkservices.vieweror custom roleae_agw_cross_project_sais present.Verify Runtime Region vs. Gateway Region: Ensure both the Reasoning Engine runtime and the Agent Gateway are deployed in the same region.
Inspect Runtime CAA Environment Variable: Inspect the Reasoning Engine deployment spec or Python definition. Verify that
env_varscontains"GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES": False.Verify IAP Binding Target Resource ID:
# Fetch the server-generated registryResource identifier gcloud agent-registry services describe MCP_SERVICE_NAME \ --project=AGW_PROJECT_ID \ --location=REGION \ --format='value(registryResource)'Confirm that
gcloud iap web add-iam-policy-bindingused the trailing UUID (agentregistry-00000000-...) as--mcp-serveror--agent, not the friendly name.Check VPC-SC Status: Confirm whether
AE_PROJECT_IDandAGW_PROJECT_IDreside in the same VPC-SC perimeter or have perimeter ingress/egress rules allowing communication.
Fix:
Grant Deployer Permissions: Grant
roles/networkservices.viewer(or permissionsnetworkservices.agentGateways.useandnetworkservices.agentGateways.get) to the deploying identity onAGW_PROJECT_ID:gcloud projects add-iam-policy-binding AGW_PROJECT_ID \ --member="user:DEPLOYER_EMAIL" \ --role="roles/networkservices.viewer"Grant Vertex AI Service Agent Permissions: Grant the Agent Runtime's service agent access to the governance project: Option A (Standard Viewer Role):
gcloud projects add-iam-policy-binding AGW_PROJECT_ID \ --member="serviceAccount:service-AE_PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com" \ --role="roles/networkservices.viewer"Option B (Least-Privilege Custom Role):
gcloud iam roles create ae_agw_cross_project_sa \ --project="AGW_PROJECT_ID" \ --title="AE AGW Cross Project SA" \ --description="Custom role for cross-project service agent to access Agent Gateways and Operations" \ --permissions="networkservices.agentGateways.get,networkservices.operations.get" \ --stage="GA" gcloud projects add-iam-policy-binding AGW_PROJECT_ID \ --member="serviceAccount:service-AE_PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com" \ --role="projects/AGW_PROJECT_ID/roles/ae_agw_cross_project_sa"Configure Runtime with CAA Opt-Out: In the agent runtime deployment configuration:
remote_agent = client.agent_engines.create( agent=local_agent, config={ "agent_gateway_config": { "agent_to_anywhere_config": { "agent_gateway": ( "projects/AGW_PROJECT_ID/locations/REGION/agentGateways/AGENT_GATEWAY_TO_ANYWHERE_NAME" ) }, }, "identity_type": types.IdentityType.AGENT_IDENTITY, "env_vars": { "GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES": ( False ), }, }, )Bind IAP Role to the Server-Generated Resource ID:
REGISTRY_RESOURCE=$(gcloud agent-registry services describe MCP_SERVICE_NAME \ --project=AGW_PROJECT_ID \ --location=REGION \ --format='value(registryResource)') RESOURCE_ID=$(basename "$REGISTRY_RESOURCE") AGENT_PRINCIPAL="principal://agents.global.org-ORG_ID.system.id.goog/resources/aiplatform/projects/AE_PROJECT_NUMBER/locations/REGION/reasoningEngines/ENGINE_ID" gcloud iap web add-iam-policy-binding \ --project=AGW_PROJECT_ID \ --region=REGION \ --resource-type=agent-registry \ --mcp-server="${RESOURCE_ID}" \ --member="$AGENT_PRINCIPAL" \ --role="roles/iap.egressor"Use Valid principalSet Syntax: For baseline Google APIs access, avoid folder-level scoping. Use project-level scoping:
principalSet://agents.global.org-ORG_ID.system.id.goog/attribute.platformContainer/aiplatform/projects/AE_PROJECT_NUMBERor trust-domain-wide scoping:
principalSet://agents.global.org-ORG_ID.system.id.goog/*
11. Reasoning Engine Container Crash: Python Dependency Mismatch / Startup Exceptions
Symptom:
- Log name:
aiplatform.googleapis.com/reasoning_engine_stderr - Error text:
ModuleNotFoundError: No module named '...'orImportError: cannot import name '...'or Python tracebacks. - The Reasoning Engine fails to deploy or dies immediately after creation.
Cause: The Python code uploaded for the Reasoning Engine depends on external packages that were not specified or incorrectly specified during deployment.
Fix:
- Identify the missing or mismatched package from the traceback in
reasoning_engine_stderr. - Update your
requirements.txtfile or therequirementsparameter in your deployment script (e.g.deploy_agent.py) to include the correct package and version constraint. - Re-deploy the Reasoning Engine.
12. mTLS Egress Failure: Invalid or Expired Client Certificate
Symptom:
- Gateway proxy load-balancer logs show connection drops or
403errors. - Logs contain
jsonPayload.mtls.clientCertChainVerified: falseor handshake failures. - The agent fails to reach the destination MCP server when using mTLS.
Cause: The client certificate used by the Agent Gateway is expired, not yet valid, or not trusted by the destination server (CA mismatch).
Fix:
- Verify the certificate validity dates and CA chain.
- If expired or invalid, upload a new certificate to Certificate Manager and
update the corresponding
ClientTlsPolicyresource. - Ensure the destination server trusts the CA that signed the gateway's client certificate.
13. Model Armor integration on Agent Gateway fails with 500 / PERMISSION_DENIED
Symptom:
- Calling
remote_agent.async_stream_queryreturns500 Internal Server Error. - Gateway Request Logs show
grpcStatus: "PERMISSION_DENIED"for the Model Armor backend andauthzPolicyInfo.result: DENIED.
How to Identify: Search in Cloud Logging in the consumer project using the following query:
resource.type="networkservices.googleapis.com/Gateway"
jsonPayload.serviceExtensionInfo.backendTargetName : "modelarmor"
jsonPayload.serviceExtensionInfo.backendTargetType="BACKEND_SERVICE"
jsonPayload.serviceExtensionInfo.grpcStatus="PERMISSION_DENIED"Cause: The gateway proxy (Secure Web Proxy) executing the inline Model Armor
scan lacks the necessary permissions in the consumer project to call the Model
Armor service. The callout runs under the Consumer's Service Extensions Service
Agent (gcp-sa-dep).
[!WARNING] Granting the legacy basic
roles/ownerorroles/editorroles to the Service Extensions Service Agent is insufficient. Granular data-plane permissions must be explicitly granted via specialized roles.
The required roles are:
roles/modelarmor.user: Required to read and apply the template.roles/modelarmor.calloutUser: Required to initiate the egress gRPC callout.roles/serviceusage.serviceUsageConsumer: Required to consume quota and bill it.
Fix: Grant all three required roles to the consumer-side delegated Service
Extensions Service Agent (gcp-sa-dep) in the consumer project.
gcloud projects add-iam-policy-binding CONSUMER_PROJECT_ID \
--member="serviceAccount:service-CONSUMER_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com" \
--role="roles/modelarmor.user"
gcloud projects add-iam-policy-binding CONSUMER_PROJECT_ID \
--member="serviceAccount:service-CONSUMER_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com" \
--role="roles/modelarmor.calloutUser"
gcloud projects add-iam-policy-binding CONSUMER_PROJECT_ID \
--member="serviceAccount:service-CONSUMER_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com" \
--role="roles/serviceusage.serviceUsageConsumer"15. Egress Blocked: Empty Agent Registry IAM Policy (403 Forbidden)
Symptom: All egress attempts through the gateway fail with a 403 Permission Denied (logged as Egress request is not authorized).
Cause: The IAM policy on the agent-registry resource in the consumer
project is empty or lacks bindings for the agent. The agent's service account
must be explicitly granted the roles/iap.egressor role.
Fix: Grant the roles/iap.egressor role to the agent's service account at
the registry level.
Create a
policy.jsonfile:{ "bindings": [ { "role": "roles/iap.egressor", "members": [ "serviceAccount:YOUR_AGENT_SERVICE_ACCOUNT_EMAIL" ] } ] }Apply the policy to the Agent Registry:
gcloud iap web set-iam-policy policy.json \ --resource-type=agent-registry \ --project=YOUR_PROJECT_ID
16. Reasoning Engine deployment fails with Code 13 (Internal Error)
Symptom:
- Agent Runtime deployment fails with generic Code 13:
Failed to deploy to Agent Platform: Failed to update Agent Runtime: {'code': 13, 'message': 'Please refer to our troubleshooting pages...'}. - The instance is immediately cleaned up.
Root Cause A: Route Conflict in Shared Tenant Project (Wildcard Route Collision)
Underlying Cause: Agent Runtime allocates a single, shared tenant project per customer project and region to host Reasoning Engines. If a customer already has a Reasoning Engine bonded to one Agent Gateway (
gateway-A), the tenant project contains wildcard routes pointing togateway-A. Trying to deploy another Reasoning Engine bonded togateway-Bin the same region fails due to route conflict.Fix: A project/location can only support one active Agent Gateway bonding for Reasoning Engines.
Delete any active Reasoning Engines in the region bonded to the old gateway.
curl -X DELETE -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" "https://${LOCATION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/${LOCATION}/reasoningEngines/${REASONING_ENGINE_ID}?force=true"If the old Reasoning Engines are already deleted but routes are stuck, delete the old gateway resource to force cleanup:
gcloud network-services agent-gateways delete OLD_GATEWAY_NAME --location=LOCATION --project=PROJECT_IDRetry deployment bonded to the new gateway.
Root Cause B: Container Startup Timeout or Initialization Failure
- Underlying Cause: The container fails to complete initialization within the startup timeout limit (due to syntax errors, missing dependencies, slow network calls, or permission denials).
- Fix:
- Verify the container can start locally.
- Check Cloud Logging at the time of deployment for Python tracebacks.
- De-risk initialization code by lazy loading heavy dependencies.
17. Reasoning Engine outbound SSL handshake failure (CERTIFICATE_VERIFY_FAILED) with Egress Agent Gateway
Symptom:
- Log show:
CERTIFICATE_VERIFY_FAILED: self signed certificate in certificate chain - Occurs when a Reasoning Engine makes outbound calls while bound to an Egress
Agent Gateway with
AGENT_IDENTITYenabled.
Cause: When outgoing connections pass through Secure Web Proxy (SWG) on the Agent Gateway, SWG performs TLS decryption and inspection using a dynamic certificate signed by its custom root CA. If the Reasoning Engine trust store does not contain these root certificates, outbound handshakes fail.
For custom container or prebuilt image deployments, the automated trust certificate injection is skipped, so the gateway's root certificates are not baked into the container.
Fix / Workaround:
For Source/Config-based Deployments (Agent Runtime SDK): Create the Agent Gateway first and wait until provisioning completes. Verify root certificates are ready:
gcloud network-services agent-gateways describe GATEWAY_NAME \ --location=LOCATION \ --format="value(agentGatewayCard.rootCertificates)"Once this returns PEM certificates, deploy/update the Reasoning Engine. The pipeline will automatically bake them in.
For Custom Container / Prebuilt Image Deployments: Export the gateway's root certificates using the
gcloud network-services gateways export-cacertscommand and manually copy/bake them into your Dockerfile:COPY agw_root.crt /usr/local/share/ca-certificates/agw-gateway.crt RUN chmod 644 /usr/local/share/ca-certificates/agw-gateway.crt && update-ca-certificates ENV GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=/etc/ssl/certs/ca-certificates.crt ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
18. VPC Service Controls (VPC-SC) Perimeter Blocks Agent Gateway Provisioning
[!NOTE] Native VPC-SC Creation Support: As of September 8, 2026, Agent Gateway creation inside a VPC-SC perimeter works natively out of the box without requiring manual control plane ingress policies, provided that the Agent Connectivity Template (ACT) specifies
vpcEgress: ALL_TRAFFIC. The requirement for manual ingress policies is no longer needed for standard provisioning.
Symptom:
- Deployment of Agent Gateway fails or runtime egress is blocked when the project is inside a VPC-SC perimeter.
- Violation logs show
NETWORK_NOT_IN_SAME_SERVICE_PERIMETERor similar VPC-SC blocks for calls between the consumer project and Google-managed infrastructure.
Cause:
- ACT Egress Mode Misconfiguration (Primary Cause): The Agent Connectivity
Template is configured with
vpcEgress: PRIVATE_RANGES_ONLYor the gateway is deployed in Standalone mode (without an ACT). In these modes, traffic bypasses the customer's VPC perimeter boundaries, causing VPC-SC to reject the deployment or egress calls. - Legacy or Strict Custom Perimeters (Historical): Prior to September 8, 2026, control plane provisioning workflows required explicit ingress policies for Google-managed service agents. In legacy or custom perimeters that block Google-managed actuation identities, explicit ingress policies may still be required.
Fix:
- Verify ACT specifies
ALL_TRAFFIC: Ensure the Agent Connectivity Template usesvpcEgress: ALL_TRAFFICand binds to a valid PSC-I Network Attachment in the consumer VPC with Cloud NAT configured on the subnet. - Configure Ingress Policies (Legacy / Restrictive Perimeters Fallback): If operating in a strict perimeter where Google-managed actuation identities are blocked, configure ingress policies in your VPC-SC perimeter to allow the actuation identities. Two ingress rules are required:
Rule 1: Gateway Control Plane Actuation
Allows the control plane service agent to manage gateway resources.
- From:
- Identities:
serviceAccount:actuation-a@networkservices-prod.iam.gserviceaccount.com - Sources: Access Level
*
- Identities:
- To:
- Operations:
- Service:
compute.googleapis.com- Methods:
FirewallsService.Delete,FirewallsService.GetGlobalOperationsService.GetHealthChecksService.Delete,HealthChecksService.GetInstanceTemplatesService.Delete,InstanceTemplatesService.GetNetworksService.Delete,NetworksService.GetRegionAddressesService.DeleteRegionBackendServicesService.Delete,RegionBackendServicesService.GetRegionForwardingRulesService.Delete,RegionForwardingRulesService.GetRegionInstanceGroupManagersService.Delete,RegionInstanceGroupManagersService.GetRegionOperationsService.GetRegionRoutersService.Delete,RegionRoutersService.GetRoutesService.Delete,RoutesService.GetServiceAttachmentsService.Delete,ServiceAttachmentsService.GetSubnetworksService.Delete,SubnetworksService.Get,SubnetworksService.ListZonesService.List
- Methods:
- Service:
cloudresourcemanager.googleapis.com- Methods:
Projects.SetIamPolicy
- Methods:
- Service:
networkservices.googleapis.com(Methods:*) - Service:
networksecurity.googleapis.com(Methods:*) - Service:
serviceusage.googleapis.com(Methods:*) - Service:
certificatemanager.googleapis.com(Methods:*) - Service:
privateca.googleapis.com(Methods:*)
- Service:
- Resources:
projects/CUSTOMER_PROJECT_NUMBER
- Operations:
Rule 2: Agent Runtime
Allows the Agent Runtime pipeline agent to access security resources.
- From:
- Identities:
serviceAccount:cloud-aiplatform-pipeline-robot-prod@system.gserviceaccount.com - Sources: Access Level
*
- Identities:
- To:
- Operations:
- Service:
networksecurity.googleapis.com(Methods:*)
- Service:
- Resources:
projects/CUSTOMER_PROJECT_NUMBER
- Operations:
Replace CUSTOMER_PROJECT_NUMBER with your actual project number.
19. PSC Subnet Exhaustion Fails Agent Gateway Deployment
Symptom:
- Agent Gateway deployment fails or gets stuck during provisioning.
- Resource allocation errors related to IP addresses in GCE logs.
Cause: The Private Service Connect (PSC) Network Attachment requires free IP
addresses in its allocated subnet to establish connections. If the subnet
(especially if it is small, like /28) runs out of free IP addresses, the
gateway cannot allocate the necessary interfaces and deployment fails.
Fix: Verify and expand the PSC subnet.
Find the Agent Gateway Name (if not provided): List the gateways in the project:
gcloud network-services agent-gateways list --location=$LOCATION --project=$PROJECT_IDIdentify the subnetwork used by the gateway's Network Attachment: Describe the gateway:
gcloud network-services agent-gateways describe AGENT_GATEWAY_NAME --location=$LOCATION --project=$PROJECT_IDLook for
networkConfig.egress.networkAttachmentornetworkConfig.ingress.networkAttachment.Describe the Network Attachment to find the subnet name:
gcloud compute network-attachments describe <ATTACHMENT_NAME> --region=$LOCATION --project=$PROJECT_IDDescribe the subnetwork to check the CIDR range:
gcloud compute networks subnetworks describe <SUBNET_NAME> --region=$LOCATION --project=$PROJECT_IDIf the subnet is small (e.g.
/28or/29), it may be exhausted. Allocate a larger subnet (minimum/26recommended) or expand the existing one, and recreate the network attachment and gateway if necessary.
20. Config Validation Failure: Missing Agent Registry API enablement
Symptom: During gcloud network-services agent-gateways import, the command
fails with:
ERROR: (gcloud.alpha.network-services.agent-gateways.import) {
"code": 3,
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "most likely missing permissions in project <PROJECT_NUMBER>, location <LOCATION>: agentregistry.agents.list, agentregistry.endpoints.list, and agentregistry.mcpServers.list",
"field": "resource.registries"
}
]
}
],
"message": "Config validation failed"
}Cause: The Agent Registry API (agentregistry.googleapis.com) is not
enabled in the project. The error message misleadingly suggests a permission
issue.
Fix: Enable the Agent Registry API in the project:
gcloud services enable agentregistry.googleapis.com --project=YOUR_PROJECT_ID21. Agent Identity Egress to Cloud Run / Functions fails with 401/403 (JWT Auth issue)
Symptom: The agent is registered in the Agent Registry with an Agent Gateway. When attempting to call an MCP server or tool hosted on Cloud Run or Cloud Functions, the request fails with an egress error or HTTP 401 Unauthorized / 403 Forbidden.
Cause: Direct Agent Identity (using principalSet) to Cloud Run OIDC
authentication is not supported natively. Cloud Run requires a standard OIDC ID
token, which the default agent identity cannot obtain directly.
Fix / Workaround: The agent must use Service Account impersonation to obtain an OIDC ID token to authenticate with Cloud Run.
Configure IAM Permissions:
- The Agent Identity (
principalSet://...) must have theroles/iam.serviceAccountTokenCreatorrole on a target Service Account (e.g.mcp-invoker-sa). - The target Service Account must have
roles/run.invokeron the Cloud Run service.
- The Agent Identity (
Enable Service Account Token Creator API: Ensure
iamcredentials.googleapis.comis enabled in the project.Impersonate in Code: Use the Google Auth SDK to impersonate the Service Account and generate ID tokens for the Cloud Run audience. Example Python (ADK):
from google.auth import impersonated_credentials import google.auth source_creds, _ = google.auth.default(scopes=["https://www.googleapis.com/auth/cloud-platform"]) impersonated = impersonated_credentials.Credentials( source_credentials=source_creds, target_principal="YOUR_TARGET_SA_EMAIL", target_scopes=["https://www.googleapis.com/auth/cloud-platform"], ) id_token_creds = impersonated_credentials.IDTokenCredentials( target_credentials=impersonated, target_audience="YOUR_CLOUD_RUN_URL_ORIGIN", include_email=True, ) # Use id_token_creds to authenticate requests to Cloud Run.
22. Agent deployed but not visible in Registry (Boundary issue)
Symptom: You have successfully deployed an agent (e.g., via Agent Runtime
SDK), but when you list agents from your designated Management Project using
gcloud agent-registry agents list, the agent is missing.
Cause: The Agent Registry uses a "Management Boundary" to define which projects' agents are governed and visible. If the project where the agent was deployed is not included in the Management Boundary of the Management Project, it will not be discoverable.
Fix: Update the Agent Management Boundary of your Management Project to include the project or folder where the agent is hosted.
Verify the current boundary settings (if supported) or update the boundary to include the target CRM node (project or folder):
gcloud agent-registry boundary update --crmNode=projects/YOUR_AGENT_HOST_PROJECT_IDOr if you want to manage a whole folder:
gcloud agent-registry boundary update --crmNode=folders/YOUR_FOLDER_ID
23. Telemetry Egress Blocked by Egress Agent Gateway (Startup Failure)
Symptom: Reasoning Engine deployment fails to start up (container crashes
during set_up()). Logs show connection reset or handshake errors to
telemetry.mtls.googleapis.com.
Cause: Your project is using an Egress Agent Gateway (default-deny). The agent runtime connects to Google telemetry services during startup. Because these endpoints are not registered in the Agent Registry and allowed via policy, the gateway blocks the connection, causing the startup probe to fail.
Fix: Register the required telemetry endpoints in the Agent Registry and allow access via policy.
Verify & Register Telemetry and Tracing Endpoints: You MUST explicitly check and verify whether all required monitoring and tracing endpoints (
telemetry.mtls.googleapis.com,monitoring.googleapis.com,trace.mtls.googleapis.com,cloudtrace.googleapis.com) are registered as Endpoints in the Agent Registry:gcloud agent-registry endpoints list --location=us-central1 --project=$PROJECT_IDIf any of them are missing, create endpoint entries for them (e.g.
telemetry.mtls.googleapis.com,monitoring.googleapis.com,trace.mtls.googleapis.com,cloudtrace.googleapis.com):gcloud agent-registry endpoints create google-telemetry \ --fqdn=telemetry.mtls.googleapis.com \ --location=us-central1Authorize the Egress: Ensure your
AuthorizationPolicyis correctly bound to the Gateway and allows the agent's principal set to egress to these endpoints.
24. UAP Org Policy Blocker (constraints/iam.managed.disableAccessPolicyBinding)
Symptom: Creating an IAM Policy Binding (gcloud iam policy-bindings create
or Terraform google_iam_policy_binding) fails with:
ERROR: (gcloud.beta.iam.policy-bindings.create) CUSTOM_ORG_POLICY_VIOLATION: Operation violates organization policy constraint 'constraints/iam.managed.disableAccessPolicyBinding'.Cause: Enterprise Google Cloud organizations often enforce
constraints/iam.managed.disableAccessPolicyBinding by default to prevent
unauthorized IAM v3 bindings.
Fix: An Organization or Folder Administrator must apply an Org Policy V2
override setting enforce: false at the target resource level:
gcloud org-policies set-policy --project=${PROJECT_ID} override.yamlWhere override.yaml defines:
name: projects/PROJECT_ID/policies/iam.managed.disableAccessPolicyBinding
spec:
rules:
- enforce: falseAllow 30–60 seconds for IAM policy control plane propagation before retrying.
25. UAP Policy Binding Destruction Race Condition (400 FAILED_PRECONDITION)
Symptom: During automated teardown or terraform destroy, destroying
google_iam_access_policy fails with:
HTTP 400 FAILED_PRECONDITION: Access policy is referenced by active policy binding(s).Cause: Deleting a PolicyBinding is subject to a 10–30 second replication
delay in the IAM control plane. If an orchestrator deletes the binding and
immediately issues a deletion for the parent AccessPolicy, IAM rejects the
call because the binding is still visible in eventual consistency.
Fix: Ensure teardown workflows poll GET on the PolicyBinding resource
URL until an HTTP 404 is confirmed before deleting the referenced
AccessPolicy. In Terraform scripts or destroy provisioners, never exit 0 on
timeout.
26. Agent Gateway Multi-Registry Validation Error (Missing Global Registry)
Symptom: gcloud network-services agent-gateways import or Terraform apply
fails with:
Invalid argument: maximum of two registries are supported. When it's two registries, one of them must be global, the other one can be either regional or multi-regional.Cause: The Agent Gateway was configured with two registries, but neither was
global (e.g. two regional registries like us-central1 and us-west1), or
both were global.
Fix: In multi-registry mode, ensure exactly one registry is global,
and the second registry is regional or multi-regional:
registries:
- //agentregistry.googleapis.com/projects/PROJECT_NUMBER/locations/global
- //agentregistry.googleapis.com/projects/PROJECT_NUMBER/locations/us-central127. CEL Null Dereference Crash on Non-Tool MCP Methods
Symptom: Gatekeeper returns HTTP 500 or PERMISSION_DENIED with internal
evaluation error logs when an agent invokes MCP lifecycle or non-tool methods
(prompts/list, resources/read).
Cause: When invoking non-tool MCP operations, the tool message inside
mcp_server is null. A CEL rule that dereferences
destination.agent_registry.mcp_server.tool.annotations.* or tool.name
without first checking the method throws an unhandled null-dereference exception
in the CEL evaluator.
Fix: Guard all tool attribute dereferences with a method check:
(destination.agent_registry.mcp_server.method == 'tools') && (destination.agent_registry.mcp_server.tool.annotations.read_only_hint == true)28. ACT ALL_TRAFFIC Silent Outbound Hang (Missing Cloud NAT)
Symptom: When an Agent Gateway uses an Agent Connectivity Template with
vpcEgress: ALL_TRAFFIC, Reasoning Engine calls to public external APIs
(api.weather.gov, api.ipify.org, SaaS tools) hang and eventually fail with
connection timeouts. Egress to Google APIs continues to function normally.
Cause: In ALL_TRAFFIC mode, all non-Google outbound packets exit the PSC-I
Network Attachment into the consumer VPC subnet (agw-psci-subnet). If that
subnet does not have an active Cloud NAT gateway, public traffic is dropped.
(Google APIs bypass Cloud NAT via Andromeda Private Google Access).
Fix: Configure Cloud Router and Cloud NAT on the consumer VPC covering the PSC-I subnet:
gcloud compute routers nats create agw-cloud-nat \
--router=agw-nat-router \
--region=LOCATION \
--nat-custom-subnet-ip-ranges=agw-psci-subnet \
--auto-allocate-nat-external-ips29. CCFE Agent Gateway Mutation Concurrency Lock (HTTP 409 ABORTED)
Symptom: Submitting a PATCH, update, or import command against an Agent Gateway returns:
HTTP 409 ABORTED: unable to queue the operationCause: Cloud Control Forwarding Engine (CCFE) enforces strict mutual exclusion per Agent Gateway resource. Concurrent mutations are aborted while an asynchronous update operation is already active.
Fix: Wait ~1.5 to 2 minutes for the in-flight Long-Running Operation (LRO)
to reach done: true before initiating another mutation.
30. Dangling Reference on ACT Deletion (FROM_AGENT_GATEWAY)
Symptom: Attempting to delete an Agent Connectivity Template fails with:
HTTP 400 FAILED_PRECONDITION: Resource projects/.../agentConnectivityTemplates/... is already being used by resource(s) projects/.../agentGateways/...even after the referenced Agent Gateway has been deleted.
Cause: Network Services retained an internal cross-reference protection
(FROM_AGENT_GATEWAY<ID>) after gateway deletion.
Fix: Delete the dangling reference via Stubby:
stubby call blade:network-services-prod-${REGION} google.internal.cloud.reference.References.DeleteReference \
"name: 'projects/${PROJECT_NUMBER}/locations/${REGION}/agentConnectivityTemplates/${ACT_NAME}/references/FROM_AGENT_GATEWAY_${GATEWAY_ID}'"31. Reasoning Engine Deletion Preconditions (Active Sessions Require ?force=true)
Symptom: Deleting a Vertex AI Reasoning Engine instance fails with:
HTTP 400 FAILED_PRECONDITION: Cannot delete ReasoningEngine with active sessions.Cause: Active agent sessions or conversations remain attached to the engine runtime.
Fix: Append ?force=true to the delete API call or use the force flag in
the CLI/REST client to cascade session cleanup.
32. REST API Path Matching Gotcha (.json Extensions and Query Strings)
Symptom: An agent calling an external REST API (e.g. Zendesk) receives HTTP
403 Egress request is not authorized, even though a UAP rule allows
/api/v2/tickets.
Cause: SDK clients typically append .json (e.g. /api/v2/tickets.json) or
query strings (?page=1). Strict equality checks reject these variations, while
naive .startsWith('/api/v2/tickets') introduces security escapes to
/api/v2/tickets_delete_all.
Fix: Construct explicit boundary-aware CEL path conditions:
((destination.unregistered.path == '/api/v2/tickets') ||
(destination.unregistered.path == '/api/v2/tickets.json') ||
(destination.unregistered.path.startsWith('/api/v2/tickets/')) ||
(destination.unregistered.path.startsWith('/api/v2/tickets?')) ||
(destination.unregistered.path.startsWith('/api/v2/tickets.json?')))33. Secure Web Proxy (SWP) & Policy-Based Routing (PBR) Egress Failures
Symptom: When attempting to route egress traffic from an Agent Gateway
Network Attachment through a downstream Secure Web Proxy (SWP) for Layer 7 URL
filtering, packets drop silently, connections time out, or requests fail with
HTTP 403 Forbidden, HTTP 503 Service Unavailable: remote connection failure,
or INVALID_ARGUMENT.
Causes & Platform Constraints:
- PSC Endpoints Cannot Be Route Next-Hops: Google Cloud route tables (both
static routes and Policy-Based Routes) do not allow Private Service
Connect (PSC) forwarding rules (
--load-balancing-scheme="") or service attachments as next hops. - SWP via PSC Service Attachment Lacks Next-Hop Mode: Publishing Secure
Web Proxy behind a PSC Service Attachment operates strictly in Explicit
Proxy Mode (
HTTP CONNECT). Packets emerging from an Agent Gateway Network Attachment are Layer 3/Layer 4 transparent IP packets; they cannot reach an explicit proxy without client-side proxy configuration (which Vertex AI Reasoning Engine containers do not support). - Static Route Tag Defect: Next-hop routing mode with static routes
requires VM network tags (
--tags). Network Attachments (compute network-attachments) are consumer network interfaces, not VM instances, and cannot bear network tags. Static routes cannot match or steer traffic originating from an Agent Gateway Network Attachment. - SWP Gateway Resource Definition Syntax Error: Creating an SWP gateway
with
type: SECURE_WEB_PROXYfails validation. The Cloud Control Forwarding Engine API requirestype: SECURE_WEB_GATEWAYandroutingMode: NEXT_HOP_ROUTING_MODE. - Cloud NAT Missing
ENDPOINT_TYPE_SWG: SWP Envoy proxy instances reside on the private proxy-only subnet and lack external IPs. Outbound internet egress requires Cloud NAT configured with--endpoint-types=ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG. IfENDPOINT_TYPE_SWGis omitted, proxy outbound traffic hangs silently. - ADK Streaming Session Allowlist Omission: In
ALL_TRAFFICACT mode, Agent Development Kit (ADK) streaming queries initialize sessions viaPOST https://<region>-aiplatform.mtls.googleapis.com/.../sessions. BecauseALL_TRAFFICforces all runtime egress to the Network Attachment, PBR steers this session call to SWP. If<region>-aiplatform.mtls.googleapis.comis omitted from the GatewaySecurityPolicy allowlist, SWP drops it (default_denied), causing ADK streaming queries to fail with HTTP 503 (remote connection failure), while directquery()calls succeed.
Fix:
Deploy Next-Hop SWP directly in the consumer VPC: Create an Envoy proxy-only subnet (
purpose: REGIONAL_MANAGED_PROXY,role: ACTIVE, minimum/26) and deploy SWP listening on an internal IP on the PSC-I subnet (e.g.10.20.1.250) withtype: SECURE_WEB_GATEWAYandroutingMode: NEXT_HOP_ROUTING_MODE.Configure Policy-Based Routing (PBR): Create a PBR matching source CIDR
10.20.1.0/24(the Network Attachment subnet) and destination0.0.0.0/0with--next-hop-ilb-ip=10.20.1.250(priority 200). Add a default fallback PBR with priority 1000:gcloud network-connectivity policy-based-routes create agw-psci-to-swp-pbr \ --network=projects/PROJECT_ID/global/networks/VPC_NAME \ --source-range=10.20.1.0/24 \ --destination-range=0.0.0.0/0 \ --next-hop-ilb-ip=10.20.1.250 \ --priority=200 \ --project=PROJECT_IDConfigure Cloud NAT with
ENDPOINT_TYPE_SWG: Update the Cloud NAT on the Cloud Router to include--endpoint-types=ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG.Allowlist External Domains and Regional AI Platform in GatewaySecurityPolicy: Ensure the CEL policy rule permits both external target domains and the regional AI platform session endpoint:
inUrlList(host(), ['api.weather.gov', 'api.ipify.org', '<region>-aiplatform.mtls.googleapis.com']).