Agent Platform Troubleshooting
GoogleOfficialPublished by Google
- Skill
- Review and audit
- Software development
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured diagnostic framework for identifying and resolving complex issues within the Google Cloud Gemini Enterprise Agent Platform. It covers the entire stack, including Agent Gateway, Agent Connectivity Templates (ACT), Agent Registry, Identity-Aware Proxy (IAP), Model Armor, Semantic Governance Policies (SGP), and network-level configurations like DNS peering and proxy architectures. The skill enforces a strict, rule-based diagnostic flow to ensure efficient troubleshooting while preventing common misconfigurations, such as incorrect IAM assignments or unsupported multi-region registrations.
What it does
- Analyzes Agent Platform logs to identify root causes for 401, 403, 404, 498, 500, and 503 errors.
- Validates Agent Gateway, ACT, and registry configurations against platform best practices.
- Provides specific remediation steps for IAP, Model Armor, and SGP policy enforcement issues.
- Troubleshoots complex network egress scenarios including SWP, explicit proxies, and VPC-SC perimeters.
- Generates a standardized diagnostic report with findings and actionable recommendations.
- Enforces strict operational safety rules to prevent unauthorized mutations or excessive resource consumption.
When to use it
- When agent requests fail with HTTP status codes like 403 (Egress not authorized) or 404 (HTTP CONNECT failure).
- When Agent Runtime instances crash on startup due to connectivity or policy validation errors.
- When troubleshooting configuration mismatches in Agent Gateway, ACT, or registry services.
- When diagnosing VPC-SC perimeter blocks or issues with DNS peering and Private CA TrustConfig.
- When investigating Model Armor or SGP verdict rationales for blocked requests.
Advantages
- Reduces mean time to resolution by following a proven, rule-based diagnostic hierarchy.
- Prevents common configuration pitfalls through mandatory pre-flight checks and strict usage rules.
- Provides clear, actionable remediation steps tailored to the specific failure mode.
- Ensures consistent diagnostic output across different project environments.
- Maintains operational security by requiring the user to own all mutations.
Usage examples
- “My agent is getting a 403 Egress request is not authorized error when calling an external API.”
- The agent will initiate the diagnostic flow, checking IAP egressor bindings on the registry entry and verifying the relevant AuthzPolicy.
- “Why is my Agent Gateway stuck in PROVISIONING state?”
- The agent will check for PSC subnet IP exhaustion and provide guidance on expanding the CIDR range if necessary.
- “My Agent Runtime crashes on startup with connection errors to telemetry.mtls.googleapis.com.”
- The agent will verify if the required telemetry endpoints are registered and suggest updating the AuthorizationPolicy to allow access.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/agent-platform-troubleshooting/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip agent-platform-troubleshooting.zip -d .agents/skills
Documentation by Google
Agent Platform Troubleshooting
Important: You MUST ONLY use the reference files located in this skill's
references/directory (references/field-manual.md,references/known-issues.md,references/agent-gateway.md,references/policies.md,references/agent-registry.md,references/agent-identity.md). Do NOT search for or read external playbooks outside this directory.
Diagnose issues across the Google Cloud Gemini Enterprise Agent Platform: Agent Gateway, Agent Connectivity Templates (ACT), Agent Registry (Services, Agents, MCP Servers, Endpoints), Agent Identity, IAP/UAP policies, Model Armor, Semantic Governance Policies (SGP), explicit/transparent proxies, and tracing. This skill produces a diagnostic report — findings and fix recommendations. It does not apply fixes; the user owns all mutations.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow Usage Attribution. Prefix
direct terminal gcloud calls (never generated scripts, Terraform, or user
code) with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:agent-platform-troubleshooting)"
and append agent-skills/1.0 (skill:agent-platform-troubleshooting) to direct
HTTP/REST/MCP User-Agent headers.
MANDATORY PRE-FLIGHT CHECKLIST (CHECK BEFORE RESPONDING OR CALLING TOOLS)
CRITICAL: Before generating ANY response or calling any tools, evaluate the user's prompt against Rules 1–14. When a Turn-0 rule matches, execute its directive immediately and STOP.
Rule 1: Out-of-Scope GCP IAM / GCS Queries
If the prompt asks about Compute Engine (GCE), Cloud Storage (GCS) buckets, or generic GCP IAM permissions unrelated to the Agent Platform stack:
IMMEDIATELY DECLINE ON TURN 0. DO NOT CALL ANY TOOLS OR GIVE IAM GUIDES.
Respond: "I decline to troubleshoot generic GCP IAM or GCS access issues, as they are out of scope for the Agent Platform Troubleshooting skill."
Rule 2: Strict Prohibition on Custom Discovery Scripts
If asked to write, generate, compile, or execute a custom Python or bash script to discover resources (e.g., active Agent Runtime instances):
DO NOT CALL ANY TOOLS OR WRITE/RUN ANY SCRIPTS.
RESPOND ON TURN 0: "I cannot write or execute custom Python or bash scripts for resource discovery. Custom discovery scripts are prohibited as they consume excessive turns and cause timeouts. Instead, use standard gcloud CLI commands (see Google Cloud SDK Installation) or curl REST API calls with application default credentials:
gcloud agent-registry agents list --location=us-central1orcurl -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" "https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/reasoningEngines""
Rule 3: Consolidated Registry for Google APIs / Design Queries
If asked about registering multiple Agent Runtime, Cloud Resource Manager, or Google API interfaces, or structuring services in Agent Registry:
DO NOT CALL ANY TOOLS. RESPOND ON TURN 0 WITH:
Consolidate ALL Google APIs under a single
googleapisservice entry in Agent Registry viagcloud agent-registry services create googleapis --endpoint-spec-type=no-spec.Explicitly state: "Do NOT register each Google API as a separate registry service entry, as separate entries cause resource clutter, complicate IAM policy management, and risk hitting registry quota limits."
List all 8 required base FQDN interfaces (plus global
https://aiplatform.googleapis.comwhen calling global Gemini models):https://agentregistry.googleapis.comhttps://aiplatform.mtls.googleapis.comhttps://cloudresourcemanager.mtls.googleapis.comhttps://iamcredentials.mtls.googleapis.comhttps://telemetry.mtls.googleapis.comhttps://{region}-aiplatform.mtls.googleapis.comhttps://{region}-aiplatform.googleapis.comhttps://aiplatform.{region}.rep.googleapis.com
Refer to
references/agent-registry.md§2 for the full command.
Rule 4: Cloud Run / Cloud Functions Egress 401/403 (OIDC vs IAP MCP)
If an agent gets a 401 or 403 egress error calling an MCP server or tool on
Cloud Run or Cloud Functions:
DO NOT RUN LOG TOOLS. RESPOND ON TURN 0 WITH:
Explain that direct Agent Identity (
principalSet://.../principal://...) to standard Cloud Run OIDC authentication is not natively supported.Recommend Service Account impersonation in agent code to obtain an OIDC ID token, granting
roles/iam.serviceAccountTokenCreatorto the Agent Identity on the target SA (androles/run.invokerto that SA on Cloud Run).Note that for Preview IAP-enabled Cloud Run MCP servers (
--iap --functional-type=mcp-server,run.appshort URL), authorize via IAP/UAP instead ofroles/run.invoker(seereferences/known-issues.mdBKI 21 andreferences/agent-identity.md).
Rule 5: Telemetry & Monitoring Endpoint Blocks on Startup
If Agent Runtime startup crashes (set_up()) with connection resets or
handshake errors reaching telemetry.mtls.googleapis.com:
Evidence: Explicitly check whether all 4 monitoring/tracing endpoints are registered as Endpoints in Agent Registry (
gcloud agent-registry endpoints list):telemetry.mtls.googleapis.com,monitoring.googleapis.com,trace.mtls.googleapis.com, andcloudtrace.googleapis.com.Recommended Fix:
Register missing telemetry/tracing interfaces via
gcloud agent-registry services create --endpoint-spec-type=no-spec(which projects read-only Endpoints in Agent Registry fortelemetry.mtls.googleapis.com,monitoring.googleapis.com,trace.mtls.googleapis.com, andcloudtrace.googleapis.com).Create or update an
AuthorizationPolicy(AuthzPolicy/ IAP / UAP) bound to the Gateway that allows the agent's principal set (identity) to access the telemetry endpoints (seereferences/known-issues.mdBKI 23).
Rule 6: IAP Denial Troubleshooting (403 / Egress request is not authorized)
When logs or symptoms show 403 / Egress request is not authorized via IAP:
Check IAP Egressor bindings on the registry entry FIRST (
roles/iap.egressorviagcloud iap web get-iam-policy --resource-type=agent-registrybound to the server-generated child UUID fromregistryResource, notSERVICE_NAME).Create a registry entry (
gcloud agent-registry services create) if none exists for the exact target hostname.Grant
roles/iap.egressoron the registry entry (IAM v1 —set-iam-policyrequires top-level{"bindings": [...]}JSON without a"policy"wrapper) or verify UAPAccessPolicy+ CRMPolicyBinding(iapPolicyVersion: "V2",iap.googleapis.com/resources.egressViaIAP; seereferences/policies.md§2).Check IAP audit logs (
protoPayload.serviceName="iap.googleapis.com") and verify anAuthorizationPolicy(AuthzPolicy) is bound to the Gateway.Explicitly warn: "Do NOT use
roles/iap.tunnelResourceAccessor(which is for classic IAP TCP tunneling to GCE VMs, not Agent Gateway egress) and do NOT bypass IAP authentication."
Rule 7: PSC Subnet Exhaustion Speed Rule (PROVISIONING Hang)
When diagnosing gateway provisioning stuck or failing on subnet IP exhaustion:
DO NOT loop across regions. Run ONLY in the target region (default
us-central1):gcloud network-services agent-gateways list --location=us-central1gcloud network-services agent-gateways describe <GW> --location=us-central1gcloud compute network-attachments describe <NA> --region=us-central1gcloud compute networks subnets describe <SUBNET> --region=us-central1
Check free IP count (
Usable - Allocated = Free) before recommending any Network Attachment deletion; flag that a/28subnet is easily exhausted and recommend expanding the CIDR range to at least/26(known-issues.mdBKI 19).
Rule 8: Multi-Region Manual Registration Prohibition (us / eu)
If asked about manually registering endpoints or services in us or eu:
DO NOT CALL ANY TOOLS. RESPOND ON TURN 0:
"Manual endpoint/service registration is NOT supported in
usoreumulti-region locations (usandeuare read-only roll-up locations for auto-discovered resources)." (Explicitly name BOTHusandeu.)"Register manually in a specific region (e.g.,
us-central1) orglobal."
Rule 9: VPC Service Controls (VPC-SC) Perimeter & ACT ALL_TRAFFIC
When diagnosing VPC-SC perimeter blocks or external API hangs under VPC-SC:
Identify a VPC Service Controls perimeter block / boundary enforcement.
Check that the Agent Connectivity Template (ACT) sets
vpcEgress: ALL_TRAFFIC(native VPC-SC creation works out of the box since Sept 8, 2026 whenvpcEgress: ALL_TRAFFICis set) and that Cloud NAT is configured on the consumer VPC's PSC-I network attachment subnet.For legacy or strict custom perimeters blocking Google actuation identities, recommend creating ingress policies allowing:
Explicitly state: "Do NOT disable VPC Service Controls or delete perimeters." Refer to
references/known-issues.mdBKI 18 & 28.
Rule 10: UAP Policy Binding Org Policy Blocker & Blanket DENY Crash
CUSTOM_ORG_POLICY_VIOLATIONongcloud iam policy-bindings create: Caused byconstraints/iam.managed.disableAccessPolicyBinding(note: some docs misspell this plural). Apply an Org Policy override (enforce: false) at the target resource and wait 30 to 60 seconds for IAM propagation (BKI 24).Startup crash after UAP
destination.is_registered == falseDENY: Explain that the blanketDENYblocked internal/unauthenticated SDK bootstrap and metadata calls (such as Cloud Resource Manager project lookups) during Reasoning Engine init; remove or scope the blanketDENYrule (BKI 5).
Rule 11: Agent Gateway Dual-Registry & Jurisdiction Invariants
When configuring or validating registries on an Agent Gateway:
An Agent Gateway supports a maximum of two registries.
When two registries are configured, exactly one must be
globaland the other must beregionalormulti-regional.Binding two regional registries (e.g.,
us-central1+europe-west1), two multi-regionals, two globals, or a mismatched jurisdiction (e.g.,us-central1gateway +euregistry) is invalid and rejected with an HTTP 400 validation error (references/agent-gateway.md§4, BKI 26).
Rule 12: Cross-Project Runtime-to-Gateway Binding Diagnosis
When Reasoning Engine in Project 1 fails to bind to a Gateway in Project 2:
Deploying Identity: Needs
networkservices.agentGateways.useandnetworkservices.agentGateways.get(orroles/networkservices.viewer) in Project 2.Vertex AI Service Agent: Grant
roles/networkservices.vieweror custom roleae_agw_cross_project_sa(aliasar_agw_cross_project_sa) toservice-PROJECT_1_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.comin Project 2.Regional Colocation: Verify both runtime and gateway are in the same region.
CAA Opt-Out: Set
GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICEStoFalse(references/known-issues.mdBKI 10,references/agent-gateway.md§11).
Rule 13: Downstream SWP + PBR vs. Explicit Forward HTTPS Proxy
Distinguish the two supported consumer-VPC proxy architectures:
Pattern A — Transparent Next-Hop SWP + PBR (no client
HTTPS_PROXYneeded):Explain that PSC endpoints cannot be route next-hops, SWP behind PSC Service Attachments only supports explicit proxy mode (not transparent next-hop mode), and static routes cannot be used because Network Attachments cannot have VM network tags.
Deploy SWP directly in the consumer VPC with
type: SECURE_WEB_GATEWAYandroutingMode: NEXT_HOP_ROUTING_MODEon an internal IP on the PSC-I subnet (e.g.,10.20.1.250), with a/26REGIONAL_MANAGED_PROXYACTIVEsubnet.Configure Policy-Based Routing (PBR) matching source CIDR
10.20.1.0/24to--next-hop-ilb-ip=10.20.1.250(priority 200) + fallback PBR (1000).Create Cloud NAT with
ENDPOINT_TYPE_SWG(nats create ... --endpoint-types=ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG), and allowlist<region>-aiplatform.mtls.googleapis.comin SWP CEL (BKI 33).
Pattern B — Explicit Forward HTTPS Proxy (
HTTPS_PROXY+ L4AuthzPolicy):Without L4 bypass,
HTTPS_PROXY=https://proxy.corp.internal:443fails onHTTP CONNECTwith HTTP404because Agent Gateway's L7 HTTP manager terminates TLS and rejects nestedCONNECT.Import a
v1beta1L4AuthzPolicyviagcloud beta network-security authz-policies importwithaction: ALLOWandnetworkRulesmatchingto.operations[].snis(omittarget.loadBalancingSchemeandports; max 5 rules; omitfromor include7.0.0.0/8+ PSC-I CIDR infrom.sources[].ipBlocks).Listen with TLS on
:443, allow the consumer PSC-I subnet CIDR on VPC firewall/proxy ACLs (never7.0.0.0/8), setNO_PROXY/no_proxyto.googleapis.com,googleapis.com,metadata.google.internal,169.254.169.254,localhost,127.0.0.1, bundleagentGatewayCard.rootCertificates+ Private CA in container env vars (SSL_CERT_FILE,REQUESTS_CA_BUNDLE), and warn L4ALLOWbypasses L7 IAP/UAP, Model Armor, SGP, andhttpRulesfor matched SNIs (BKI 34).
Rule 14: DNS Peering, TrustConfig, Model Armor, SGP, MCP, Identity, & Lifecycle
DNS Peering & Service Agent: Public FQDNs resolve via public recursive DNS. Private DNS requires
dnsPeeringConfig(domainsarray with trailing.; ACT uses stringtargetNetworkonly, whereas inlineAgentGateway.networkConfig.dnsPeeringConfigalso requirestargetProject). Cloud DNS caps total peering hops at 2 (Gateway consumes Hop 1 → max 1 consumer peering hop; a 2nd hop fails preflight or returnsSERVFAIL→503, BKI 35). Grantroles/dns.peer,roles/dns.reader,roles/compute.networkViewer, androles/compute.networkUsertoservice-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com(andcompute.networkAttachments.useto caller, BKI 9). Never use authoritative"."private root zones ("."requires a Cloud DNS Private Forwarding Zone).Private CA
TrustConfig& Immutable ACT: SetegressNetworkConfig.tlsConfig.trustConfigwithadditionalRoots: PUBLICLY_TRUSTED_ROOTS(omitting breaks*.googleapis.com). ACT fields are immutable — create a new ACT and rebind viaPATCHwithupdateMask=agentConnectivityTemplate(BKI 6).Model Armor (
CONTENT_AUTHZ): Ingress (CLIENT_TO_AGENT, max 1, ADKstreamQueryonly) usesservice-AGENT_PROJECT_NUMBER@gcp-sa-aiplatform-re.iam.gserviceaccount.com; Egress (AGENT_TO_ANYWHERE, max 4) usesservice-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com. ScopehttpRuleswhento exclude gRPC and streams >60 seconds (Stream removed, BKI 13).Semantic Governance Policies (SGP): Uses
gcp-sa-aiplatform, non-streaming LLM calls only,.contains()+!request.headers['content-type'].startsWith('application/grpc')inwhen, and full-map updates onPATCH ?updateMask=metadatasosgpEnforcementMode: "DRY_RUN"andsgpUserIntentMatchingare preserved (BKI 38).Native MCP, Identity, Trace, & Teardown: Set
baseProtocolMethodsOption: MATCH_BASE_PROTOCOL_METHODSon MCPALLOWrules (BKI 39). Orgless trust domains useagents.global.proj-PROJECT_NUMBER.system.id.goog(proj-, neverproject-); never grantroles/aiplatform.expressUseror project-wideroles/aiplatform.userto Agent Identities. For Cloud Trace (TelemetryPolicy), always recommend enablingcloudtrace.googleapis.com(gcloud services enable cloudtrace.googleapis.com) and grantingroles/cloudtrace.agenttocompute-system,gcp-sa-networksecurity, andgcp-sa-agentgateway(seereferences/agent-gateway.md§8.3 andreferences/field-manual.mdStep 14.4). Tear down in strict 7-step order (workloads → UAP bindings →AuthzPolicy→ extensions →AgentGateway→ ACT → VPC) and use unique gateway IDs if deletion tombstones collide (BKIs 25, 30).
Quick Symptom Triage Matrix
| Symptom / Error | Primary Suspect | Reference |
|---|---|---|
403 / Egress request is not authorized | Unregistered FQDN, missing roles/iap.egressor / UAP binding, or PAB | Rules 4, 6; references/policies.md §2; BKIs 4, 7, 8, 15 |
HTTP 404 on HTTP CONNECT (HTTPS_PROXY) | Missing gcloud beta L4 AuthzPolicy (networkRules snis) | Rule 13B; references/agent-gateway.md §6.3; BKI 34 |
HTTP 498 immediately after binding runtime | Enforcing gateway bound before allowlisting essential platform APIs | references/agent-gateway.md §2; BKI 37 |
500 / PERMISSION_DENIED / Stream removed | Model Armor SA roles (gcp-sa-dep vs gcp-sa-aiplatform-re) or 60s stream cap | Rule 14; references/policies.md §12; BKI 13 |
503 / NXDOMAIN / SERVFAIL on private host | >2-hop DNS peering, authoritative "." zone, Packet Intercept, or SWP | Rules 13A, 14; references/agent-gateway.md §3, §6; BKIs 33, 35, 36 |
Config validation failed / PERMISSION_DENIED on import | Disabled agentregistry.googleapis.com, missing caller/gcp-sa-agentgateway IAM, or bad NA URI | Rule 14; BKIs 9, 20, 26 |
HTTP 409 ABORTED / 400 already being used | Active control-plane LRO mutex (~2 min), tombstone collision, or reverse teardown | references/agent-gateway.md §9, §10; BKIs 25, 29, 30 |
Startup crash (reasoning_engine_stderr) | Blocked telemetry/CRM bootstrap, UAP blanket DENY, or SGP gRPC interception | Rules 5, 10, 14; BKIs 1, 5, 17, 23, 38 |
When to use this skill
Trigger on Agent Gateway, Agent Connectivity Templates (ACT), Agent Registry,
Agent Identity, IAP/UAP policies, Model Armor, Semantic Governance Policies
(SGP), SWP/Explicit Proxy egress, Private CA TrustConfig, Cloud DNS peering,
Cloud Trace TelemetryPolicy, or Gemini Enterprise / Agent Runtime / GKE /
Cloud Run gateway bindings. Do not use for generic Google Cloud IAM, GCS,
GCE, or networking issues unrelated to the Agent Platform stack.
Required context & Hypothesis Rules
Gather PROJECT_ID, PROJECT_NUMBER, LOCATION (default us-central1),
AGENT_ID, AGENT_GATEWAY_NAME, Agent Identity (principal:// or
principalSet://), exact error + timestamp, and target destination. If missing,
ask or state unknowns using placeholders — never scan across projects or loop
over regions. Before Step 1 queries, formulate at most 3 hypotheses anchored
to "Why did it start failing now?" (e.g., recent Terraform/config changes).
Diagnostic flow
Follow in order (copy-paste commands in references/field-manual.md):
Step 0 — Pre-Flight & Access: Evaluate Rules 1–14. Verify project access (
gcloud projects describe $PROJECT_ID).Step 1 — Agent & Startup Logs: Classify error (
403,404 CONNECT,498,500,503, crash, timeout). Check PSC subnet IPs, ACTALL_TRAFFIC+ Cloud NAT, andagentGatewayCard.rootCertificatesCA trust.Step 2 — Gateway Logs: Query
networkservices.googleapis.com/Gateway(filtering-httpRequest.requestMethod="CONNECT"when inspecting L7 requests) to find the exact failing SNI/hostname andserviceExtensionsInfo.Step 3 — IAP / Model Armor / SGP Logs: Check
iapPolicyVersion(V1vsV2),DRY_RUNvs enforced, Model Armor callout status, orlogs/semantic-governance-policyverdicts and rationales.Step 4 — Registry State: Verify exact hostname permutations in
gcloud agent-registry {services,endpoints,mcp-servers,agents} listand confirm dual-registry + jurisdiction rules.Step 5 — Identity & Policies: Check
roles/iap.egressorvia--resource-type=agent-registryon the child UUID (V1), UAPAccessPolicy/PolicyBinding+constraints/iam.managed.disableAccessPolicyBinding(V2), PAB overrides, and least-privilege Agent Identity roles (proj-for orgless).Step 6 — AuthzPolicy & Extensions: Verify L4
networkRulesvs L7httpRules, MCPMATCH_BASE_PROTOCOL_METHODS, Model Armor / SGPwhenexclusions,ExtensionBindingscope, and policy caps (max 4 egress, max 1 ingressCONTENT_AUTHZ).Step 7 — Connectivity, DNS, & TLS: Verify ACT
TrustConfig(PUBLICLY_TRUSTED_ROOTS),gcp-sa-agentgatewayIAM, <=2 DNS peering hops, no Packet Intercept on the consumer VPC, and SWP/Explicit Proxy settings.Step 8 — PrincipalSet & Trace Verification: Test 1:1
principal://binding ifprincipalSet://lags; for Cloud Trace, enablecloudtrace.googleapis.com, verifyv1beta1TelemetryPolicy(telemetryTargetreferencingagentGateways/*and objectparentBasedSampling: {enabled: true, samplingRate: 1.0}, never stringENABLED), and grantroles/cloudtrace.agenttoservice-<PROJECT_NUMBER>@compute-system.iam.gserviceaccount.com,service-<PROJECT_NUMBER>@gcp-sa-networksecurity.iam.gserviceaccount.com, andservice-<PROJECT_NUMBER>@gcp-sa-agentgateway.iam.gserviceaccount.com.
Tools & Layered References
Use mcp__gcloud__run_gcloud_command (or gcloud --quiet),
mcp__gcloud-observability__list_log_entries (or gcloud logging read),
mcp__google-dev-knowledge__search_documents / get_documents / answer_query,
and curl REST GETs, plus bundled references (load only the smallest set needed):
references/field-manual.md — read first for operational commands & log queries
references/known-issues.md — BKIs #1–#13, #15–#39 for fast pattern matches
references/agent-gateway.md — topologies, ACT, DNS, TLS, SWP/Explicit Proxy, Trace, teardown
references/policies.md — L4/L7
AuthzPolicy, MCP, UAP v3beta, Model Armor, SGPreferences/agent-registry.md —
servicesvs projectedendpoints, 9 API families, jurisdictionsreferences/agent-identity.md — 3-identity delegation, Cloud Run OIDC vs IAP MCP, WIF
Output report
Always produce a read-only diagnostic report using this exact structure:
# Agent Platform Diagnostic — <one-line summary>
## Context
- Project: <id> (<number>) | Location: <region>
- Agent: <agent_id> | Gateway: <gateway_name>
- Symptom: <exact error message and when it started>
## Evidence gathered
- Agent log query: <filter, summary>
- Gateway log query: <filter, exact failing hostname / extension status>
- IAP / Policy log query: <filter, decision + enforcement mode>
- Registry & Policy state: <entries, AuthzPolicy bindings, roles/iap.egressor or UAP>
## Root cause hypothesis
<ranked root cause(s)>
## Why this fits the evidence
<connect log/config evidence to root cause>
## Recommended fix
<ordered gcloud / curl / YAML / Terraform changes for the user to apply>
## What to verify after the fix
<verification queries>
## Open questions / unknowns
<missing context or unverified items>
## Appendix: Raw Logs & Verified Links
- **Cloud Logging Filter**: <exact copy-pasteable filter or deep link>
- **Raw Logs**: <untruncated Agent, Gateway, and IAP/Policy log entries>Principles
Exact hostname match first: Compare gateway log hostnames directly against Agent Registry.
Layered default-deny: Registry → Gateway
AuthzPolicy→ Extension → IAP/UAP/Model Armor/SGP → PAB (PAB overrides IAM Allow).L4 bypass vs L7 governance: L4
networkRulesenablesHTTP CONNECTexplicit proxies (:443) but bypasses L7 IAP, Model Armor, and SGP for matched SNIs.Read-only, single-region, non-interactive: Pull evidence first, never mutate resources, check
us-central1unless logs indicate otherwise, and pass--quiet.
Supporting Links
Files
- ATTRIBUTION.mdAdded by AutoGineer878 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md26.2 KiB
- references/agent-gateway.md55.2 KiB
- references/agent-identity.md33.6 KiB
- references/agent-registry.md49.7 KiB
- references/attribution.md1.9 KiB
- references/field-manual.md68.3 KiB
- references/known-issues.md87.6 KiB
- references/policies.md75.2 KiB
references/known-issues.md
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 50-72
2. ReasoningEngine startup: Assembly Service init: Lines 73-85
3. Reasoning Engine Gateway Sharing Constraints, Pre-April 29, 2026 Instances, & SCC Threat Detection: Lines 86-115
4. 403 / Egress not authorized — missing authz_policy or UAP binding: Lines 116-150
5. IAP ENFORCE / Blanket DENY blocks Agent Runtime startup: Lines 151-180
6. Private CA & Self-Signed TLS Destinations (TrustConfig, PUBLICLY_TRUSTED_ROOTS, & ACT Rebind): Lines 181-233
7. Principal Access Boundary (PAB) override: Lines 234-269
8. Gateway proxy denies before IAP: Lines 270-320
9. Cross-Project / VPC Agent Gateway & ACT Import Failures (PERMISSION_DENIED, INVALID_ARGUMENT, or Code 13): Lines 321-396
10. Cross-Project Runtime-to-Gateway Binding Failures: Lines 397-609
11. RE Container Crash: Dependency Mismatch: Lines 610-632
12. mTLS Egress Failure: Expired Cert: Lines 633-654
13. Model Armor Integration Fails with 500, PERMISSION_DENIED, or 60s Stream Termination: Lines 655-721
15. Egress Blocked: Empty Registry IAM Policy: Lines 722-758
16. RE deployment fails with Code 13: Lines 759-807
17. RE outbound SSL handshake failure (Egress Gateway): Lines 808-862
18. VPC-SC Perimeter Blocks Provisioning: Lines 863-964
19. PSC Subnet Exhaustion Fails Deployment: Lines 965-1013
20. Config Validation Failure: Missing Agent Registry API / Caller Permissions: Lines 1014-1052
21. Agent Identity Egress to Cloud Run/Funcs (JWT issue): Lines 1053-1104
22. Cross-Project Agent Not Visible in Central Registry: Lines 1105-1130
23. Telemetry Egress Blocked by Egress Gateway: Lines 1131-1178
24. UAP Org Policy Blocker (disableAccessPolicyBinding): Lines 1179-1213
25. UAP Policy Binding Destruction Race Condition: Lines 1214-1234
26. Agent Gateway Multi-Registry & Jurisdiction Validation Errors: Lines 1235-1262
27. CEL Null Dereference Crash on Non-Tool MCP Methods: Lines 1263-1282
28. ACT ALL_TRAFFIC Silent Outbound Hang (Missing Cloud NAT): Lines 1283-1307
29. Agent Gateway Control-Plane Mutation Concurrency Lock (HTTP 409 ABORTED): Lines 1308-1325
30. ACT Deletion Fails with 400 FAILED_PRECONDITION (already being used): Lines 1326-1358
31. Reasoning Engine Deletion Preconditions (Active Sessions): Lines 1359-1374
32. REST API Path Matching Gotcha (.json and Query Strings): Lines 1375-1398
33. Secure Web Proxy (SWP) & Policy-Based Routing (PBR) Egress Failures: Lines 1399-1474
34. Explicit Forward HTTPS Proxy (HTTP CONNECT) Fails with HTTP 404 or 403: Lines 1475-1557
35. Cloud DNS Transitive Peering Chain Exceeded (>2 Hops) or Authoritative Root Zone ("."): Lines 1558-1603
36. Consumer VPC Packet Intercept (HTTP 503) & Workforce/Workload Identity Federation Limits: Lines 1604-1639
37. Immediate HTTP 498 After Binding Agent Runtime, or Gemini Enterprise UpdateEngine Failures: Lines 1640-1673
38. Semantic Governance Policy (SGP) Failures: Lines 1674-1727
39. Native MCP AuthzPolicy Blocks Session Handshake (MATCH_BASE_PROTOCOL_METHODS): Lines 1728-1785
1. ReasoningEngine startup: "Failed to convert project number to project ID"
Symptom:
Log name:
aiplatform.googleapis.com/reasoning_engine_stderrError 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. Reasoning Engine Gateway Sharing Constraints, Pre-April 29, 2026 Instances, & SCC Threat Detection
Symptom: Binding or updating a Reasoning Engine (Agent Runtime) to use an
Agent Gateway fails with INVALID_ARGUMENT, FAILED_PRECONDITION, or Internal error encountered (Code 13).
Causes & Platform Limits:
Shared Gateway Per
(project, region)Invariant: Multiple Reasoning Engines in the same project and region can share an Agent Gateway, provided every bound Reasoning Engine in that(project, region)binds to the exact same egress and/or ingress gateway instance. Attempting to bind a second engine in the same region to a different gateway (gateway-Bwhilegateway-Ais active) fails.Creation Date Cutoff (April 29, 2026): Reasoning Engines created before April 29, 2026 cannot be updated in-place to bind to an Agent Gateway and must be redeployed as new instances.
SCC Agent Engine Threat Detection Conflict: Agent Gateway binding is incompatible with Security Command Center (SCC) Agent Engine Threat Detection in the same project.
Revision Traffic Requirement: Updating
agent_gateway_configon an existing Reasoning Engine requires 100% of traffic on the latest revision and archives prior revisions.
Fix: Bind all Reasoning Engines in a given (project, region) to the same
Agent Gateway, redeploy any pre-April 29, 2026 engines, and disable SCC Agent
Engine Threat Detection before attaching an Agent Gateway.
4. 403 / "Egress request is not authorized" — missing authz_policy or UAP binding
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 search-target-policy-bindings \ --target="//cloudresourcemanager.googleapis.com/projects/${PROJECT_NUMBER}" \ --project="${PROJECT_ID}" \ --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. Private CA & Self-Signed TLS Destinations Fail Handshake (Missing TrustConfig or PUBLICLY_TRUSTED_ROOTS)
Symptom:
Symptom A: Outbound calls through Agent Gateway to internal MCP servers or private endpoints using Private CA or self-signed certificates fail TLS handshake verification.
Symptom B: After attaching a Certificate Manager
TrustConfigto an Agent Connectivity Template (ACT), private endpoints succeed, but all calls to*.googleapis.comand public HTTPS APIs suddenly fail TLS verification.Symptom C: Updating
tlsConfigin-place on an existing ACT fails with an immutability error or does not take effect on the running gateway.
Cause:
Private CA roots (via
trustStores) or self-signed leaf certificates (viaallowlistedCertificates) must be configured in a Certificate ManagerTrustConfigin the same project and region and attached toegressNetworkConfig.tlsConfig.trustConfigon the ACT.When
trustConfigis set withoutadditionalRoots: PUBLICLY_TRUSTED_ROOTS,additionalRootsdefaults toNO_ADDITIONAL_ROOTS, stripping Mozilla/Google public root CAs from the gateway proxy's trust store.egressNetworkConfig.tlsConfig.trustConfigis immutable on an existing ACT resource.
Fix:
Create a regional Certificate Manager
TrustConfig(trustStoresfor Private CA chains orallowlistedCertificatesfor self-signed leaf certs; target certs must contain a valid SAN).Create a new ACT (
act-v2.yaml) referencing theTrustConfigand explicitly settingadditionalRoots: PUBLICLY_TRUSTED_ROOTS:name: projects/PROJECT_ID/locations/REGION/agentConnectivityTemplates/agw-act-v2 accessPath: AGENT_TO_ANYWHERE deploymentModel: CENTRALIZED egressNetworkConfig: networkAttachment: projects/PROJECT_ID/regions/REGION/networkAttachments/agw-na vpcEgress: ALL_TRAFFIC tlsConfig: trustConfig: projects/PROJECT_NUMBER/locations/REGION/trustConfigs/private-ca-trust additionalRoots: PUBLICLY_TRUSTED_ROOTSImport the new ACT (
gcloud network-services agent-connectivity-templates import agw-act-v2 --source=act-v2.yaml --location=REGION) and rebind the Agent Gateway (agentConnectivityTemplate: .../agentConnectivityTemplates/agw-act-v2) viagcloud network-services agent-gateways import.
7. Principal Access Boundary (PAB) policies overriding IAM Allow
Symptom: Agent identity has the right egress permissions bound
(roles/iap.egressor under Policy V1 or iap.googleapis.com/resources.egressViaIAP
under UAP Policy V2) and the destination is registered, but calls still return 403.
Cause: A Principal Access Boundary policy is restricting the scope of resources the principal can access. PAB policies take precedence over IAM Allow and UAP policies — even a valid egress grant does nothing if a PAB blocks the target resource.
Investigation: List PAB policies and inspect policy bindings attached to the
target project resource (--location=global and a full CRM resource URI are
required):
# List org-wide PAB policies
gcloud iam principal-access-boundary-policies list \
--organization="${ORGANIZATION_ID}" --location=global
# Inspect policy bindings attached to the project resource
gcloud iam policy-bindings search-target-policy-bindings \
--location=global \
--project="${PROJECT_ID}" \
--target="//cloudresourcemanager.googleapis.com/projects/${PROJECT_NUMBER}"
# 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 / VPC Agent Gateway & ACT Import Failures (PERMISSION_DENIED, INVALID_ARGUMENT, or Code 13)
Symptom:
During
gcloud network-services agent-connectivity-templates importorgcloud network-services agent-gateways import, the command fails with:Structured preflight
PERMISSION_DENIEDorINVALID_ARGUMENTnaming either the caller orservice-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com, ORSynchronous
{"code": 13, "message": "an internal error has occurred"}on unexpected downstream actuation failures.
Cause:
Dual-Principal Validation: Cross-project Network Attachment and Cloud DNS peering validation checks both the caller identity (EUC / CI pipeline) and the Agent Gateway Control Plane Service Agent (
service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com).Malformed
NetworkAttachmentURI: Using/locations/REGION/instead of/regions/REGION/fails validation withinvalid network attachment URI.DNS
targetNetwork& Zone Rules: Every entry indnsPeeringConfig.domains[]must end with a trailing dot (e.g.,corp.internal.). Progressive regional rollout supports decouplingdnsPeeringConfig.targetNetworkfrom theNetworkAttachmentVPC (pointing directly at a DNS Hub VPC); in regions not yet enabled,targetNetworkmust match theNetworkAttachmentVPC (with at most 1 customer Cloud DNS Peering Zone hop to the Hub VPC — see BKI #35).
Fix:
Grant Caller / Provisioning Permissions on the Host Network/DNS Project: Grant
roles/compute.networkViewer,roles/dns.reader,roles/networkconnectivity.regionalEndpointAdmin, androles/networkconnectivity.consumerNetworkAdmin(orroles/viewer), pluscompute.networkAttachments.use(roles/compute.networkUser) if theNetworkAttachmentresides in the host 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"Grant Agent Gateway Service Agent Permissions on the Host Network/DNS Project (ensure
dns.googleapis.comis enabled):# Grant roles/compute.networkUser (if NA is in service project, recommended) # or roles/compute.networkAdmin (if NA is in host project) + networkViewer: 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" 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.networkViewer" # Grant DNS peer + reader on the target DNS project: gcloud projects add-iam-policy-binding TARGET_DNS_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com" \ --role="roles/dns.peer" gcloud projects add-iam-policy-binding TARGET_DNS_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.com" \ --role="roles/dns.reader"Verify
connectionPreference: ACCEPT_AUTOMATIC(or explicit project acceptance) onprojects/PROJECT_ID/regions/REGION/networkAttachments/NAME, and verifyservice-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.comholdsroles/compute.networkUseron the consumer PSC-I subnet.
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:
Regional Colocation & Shared-Gateway Invariants: Cross-project binding (
spec.deploymentSpec.agentGatewayConfig.agentToAnywhereConfig.agentGateway) is supported across Google Cloud projects, provided both the runtime and the gateway reside in the exact same Google Cloud region (e.g.,us-central1). Cross-region bindings are rejected withINVALID_ARGUMENT, and all bound runtimes in a given(project, region)must share the same 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_sa— also documented asar_agw_cross_project_sa— withnetworkservices.agentGateways.getandnetworkservices.operations.get) onAGW_PROJECT_ID.
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_stderrError 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 Fails with 500, PERMISSION_DENIED, or 60-Second Stream Termination (Stream removed)
Symptom:
Symptom A (
PERMISSION_DENIED): Calling the agent returns500 Internal Server Error; gateway logs showgrpcStatus: "PERMISSION_DENIED"onmodelarmor.*andauthzPolicyInfo.result: DENIED.Symptom B (
Stream removedat 60 Seconds): Long-running streaming responses or outbound HTTP/2 gRPC channels cut off right at 60 seconds with HTTP500/504or gRPCUNKNOWN: Stream removed.
How to Identify:
resource.type="networkservices.googleapis.com/Gateway"
jsonPayload.serviceExtensionInfo.backendTargetName : "modelarmor"
jsonPayload.serviceExtensionInfo.backendTargetType="BACKEND_SERVICE"Cause:
Distinct Ingress vs. Egress Service Agents:
Agent-to-Anywhere (Egress, max 4
CONTENT_AUTHZpolicies) executes callouts under the Service Extensions Service Agent:service-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com.Client-to-Agent (Ingress, max 1
CONTENT_AUTHZpolicy, sanitizes ADKstreamQueryonly) executes callouts under the AI Platform Reasoning Engine Service Agent:service-AGENT_PROJECT_NUMBER@gcp-sa-aiplatform-re.iam.gserviceaccount.com.
Warning: Basic
roles/ownerorroles/editorgrants do not satisfy Model Armor data-plane callout checks.Non-Configurable 60-Second Stream Deadline: Envoy enforces a hard 60-second total stream lifetime on
CONTENT_AUTHZcallouts (independent of per-calloutAuthzExtension.timeout1s–10s), and file/PDF sanitization is unsupported in gateway integration.
Fix:
For Agent-to-Anywhere (Egress): Grant
roles/modelarmor.calloutUserandroles/serviceusage.serviceUsageConsumeron the gateway project, plusroles/modelarmor.useron the Model Armor template project, toservice-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com:gcloud projects add-iam-policy-binding GATEWAY_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com" \ --role="roles/modelarmor.calloutUser" gcloud projects add-iam-policy-binding GATEWAY_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com" \ --role="roles/serviceusage.serviceUsageConsumer" gcloud projects add-iam-policy-binding TEMPLATE_PROJECT_ID \ --member="serviceAccount:service-GATEWAY_PROJECT_NUMBER@gcp-sa-dep.iam.gserviceaccount.com" \ --role="roles/modelarmor.user"For Client-to-Agent (Ingress): Grant
roles/modelarmor.calloutUseron the agent runtime project androles/modelarmor.useron the template project toservice-AGENT_PROJECT_NUMBER@gcp-sa-aiplatform-re.iam.gserviceaccount.com.Scope
AuthzPolicy.httpRulesto Exclude Long-Lived Streams & gRPC: RestrictCONTENT_AUTHZhttpRules(e.g.,!request.headers['content-type'].startsWith('application/grpc')and targeted non-streaming tool/model hosts) so>60sstreams bypass inlineCONTENT_AUTHZbuffering.
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: Conflicting Second Gateway in Shared Tenant Project (gateway-A vs. gateway-B)
Underlying Cause: Agent Runtime allocates one shared tenant project per customer
(project, region). Multiple Reasoning Engines in that(project, region)can share the samegateway-A, but attempting to bind a Reasoning Engine to a different gateway (gateway-B) whilegateway-Ais active fails due to wildcard route conflict (also triggered on pre-April 29, 2026 engines or projects with SCC Agent Engine Threat Detection enabled — see BKI #3).Fix: Reuse the existing
gateway-Aacross all Reasoning Engines in that(project, region), or migrate cleanly: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 chainOccurs 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: Extract the gateway's PEM root certificates using
gcloud network-services agent-gateways describe(note:gcloud network-serviceshas noexport-cacertssubcommand) and bake them into your container image:gcloud network-services agent-gateways describe GATEWAY_NAME \ --location=LOCATION \ --project=PROJECT_ID \ --format="value[delimiter=\n](agentGatewayCard.rootCertificates)" > agw_root.crtCOPY 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 ENV AGENT_GATEWAY_ROOT_CERT_302034098528=/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 the Agent Connectivity Template (ACT) specifies
vpcEgress: ALL_TRAFFICand consumer DNS resolvesgoogleapis.com.torestricted.googleapis.com(199.36.153.4/30).
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
ALL_TRAFFIC,restricted.googleapis.comDNS, & Shared VPC Co-Membership: Ensure the ACT usesvpcEgress: ALL_TRAFFICon a consumer PSC-I Network Attachment with Cloud NAT, configure a consumer Cloud DNS private zone forgoogleapis.com.(*.googleapis.comCNAME →restricted.googleapis.com.→199.36.153.4/30) peered viadnsPeeringConfig, and ensure any Shared VPC host project resides inside the same VPC-SC perimeter as the gateway and runtime projects.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:[email protected]Sources: Access Level
*
To:
Operations:
Service:
compute.googleapis.comMethods:
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
Service:
cloudresourcemanager.googleapis.comMethods:
Projects.SetIamPolicy
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:*)
Resources:
projects/CUSTOMER_PROJECT_NUMBER
Rule 2: Agent Runtime
Allows the Agent Runtime pipeline agent to access security resources.
From:
Identities:
serviceAccount:[email protected]Sources: Access Level
*
To:
Operations:
Service:
networksecurity.googleapis.com(Methods:*)
Resources:
projects/CUSTOMER_PROJECT_NUMBER
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 subnets 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.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: Primary cause: the Agent Registry API (agentregistry.googleapis.com)
is not enabled in the target registry project (even though the error message
suggests missing permissions). Secondary cause (when the API is already enabled):
the caller running agent-gateways import lacks roles/agentregistry.viewer
(agentregistry.agents.list, agentregistry.endpoints.list,
agentregistry.mcpServers.list) on the registry project.
Fix: Enable the Agent Registry API in the project (and ensure the deploying
caller holds roles/agentregistry.viewer):
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.
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.Alternative (Preview — Cloud Run MCP Servers Only): Deploy the Cloud Run MCP server with native IAP (
gcloud beta run deploy SERVICE --allow-unauthenticated --iap --functional-type=mcp-server), grantroles/run.invokerto[email protected], and target the deterministichttps://SERVICE-PROJECT_NUMBER.REGION.run.appshort URL.
22. Cross-Project Agent or MCP Server Not Visible in Central Governance Registry
Symptom: You deployed an agent or MCP server in Workload Project A, but
gcloud agent-registry agents list or mcp-servers list in Central Governance
Project B does not show it.
Cause: Automatic registration discovers resources only within the same
project where agentregistry.googleapis.com is enabled (there is no automatic
cross-project discovery or gcloud agent-registry boundary CLI command).
Fix: Manually register cross-project agents, MCP servers, and endpoints in
the Central Governance Project's registry using gcloud agent-registry services create in a specific region or global (never us or eu):
# Example: Register a cross-project A2A agent (omit --interfaces with a2a-agent-card)
gcloud agent-registry services create cross-proj-agent \
--project=GOVERNANCE_PROJECT_ID \
--location=REGION \
--display-name="Cross-Project Agent" \
--agent-spec-type=a2a-agent-card \
--agent-spec-content=agent-card.json23. 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_IDIn Agent Registry, read-only
Endpointentries are projected automatically from writableServiceentries (gcloud agent-registry endpointsis read-only with nocreatesubcommand). Register or update your consolidatedgoogleapisservice with--endpoint-spec-type=no-specso all required telemetry/tracing FQDNs are projected as Endpoints:gcloud agent-registry services create googleapis \ --location=us-central1 \ --project=$PROJECT_ID \ --display-name="Google APIs" \ --endpoint-spec-type=no-spec \ --interfaces=url=https://telemetry.mtls.googleapis.com,protocolBinding=JSONRPC \ --interfaces=url=https://monitoring.googleapis.com,protocolBinding=JSONRPC \ --interfaces=url=https://trace.mtls.googleapis.com,protocolBinding=JSONRPC \ --interfaces=url=https://cloudtrace.googleapis.com,protocolBinding=JSONRPCAuthorize the Egress: Ensure your
AuthorizationPolicy(AuthzPolicy+ IAProles/iap.egressor/ UAP policy) is bound to the Gateway and allows the agent's principal set to egress to these registered telemetry 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_{organizations,folders,projects}_policy_binding) fails with:
ERROR: (gcloud.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. (Note: always use the singular constraint name
disableAccessPolicyBinding; some documentation pages contain a plural typo
disableAccessPolicyBindings that gcloud org-policies rejects.)
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_{organization,folder,project}_access_policy (after google_iam_{organizations,folders,projects}_policy_binding) 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 & Jurisdiction Validation Errors
Symptom: gcloud network-services agent-gateways import or Terraform apply
fails with HTTP 400 / InvalidArgument:
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: Either (a) more than two registries were specified, (b) two
registries were configured without global (e.g., two regional registries like
us-central1 and europe-west1, or two global registries), or (c) the
regional/multi-regional registry violates jurisdiction alignment (a regional
gateway in us-central1 can only attach us-central1 or us, never
europe-west1 or eu).
Fix: Configure at most two registries, ensuring exactly one is global
and the second matches the gateway's exact region or data-residency
multi-region:
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. Agent Gateway Control-Plane 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: The Network Services control plane enforces a strict per-resource concurrency mutex lock on each Agent Gateway resource. Concurrent mutations are aborted while an asynchronous update or delete 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. ACT Deletion Fails with 400 FAILED_PRECONDITION (already being used)
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/...Cause: Either an Agent Gateway deletion Long-Running Operation (LRO) is still in flight, another Agent Gateway in the project still references the ACT, or an asynchronous gateway cleanup left a backend cross-reference pending.
Fix:
Verify that all referencing
AgentGatewayresources in the region have finished deleting (done: true):gcloud network-services agent-gateways list --location=${REGION} --project=${PROJECT_ID} gcloud network-services operations list --location=${REGION} --project=${PROJECT_ID}Always delete dependent resources in strict reverse order (
AuthzPolicy→AuthzExtension→AgentGateway→AgentConnectivityTemplate), waiting for each LRO to complete before issuing the next delete.If
agent-gateways listis empty and all operations showdone: truefor more than 10 minutes while the ACT still reportsalready being used, create a newly named ACT to unblock deployments immediately and open a Google Cloud Support case referencing the stuck ACT URI so support can clear the orphaned backend reference.
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 (unless the container is explicitly configured withHTTPS_PROXYon:443and av1beta1L4AuthzPolicy— see BKI #34).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 Network Services 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: Create (or recreate) Cloud NAT on the Cloud Router viagcloud compute routers nats createwith--endpoint-types=ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG(--endpoint-typesis immutable and not supported onnats update).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']).
34. Explicit Forward HTTPS Proxy (HTTP CONNECT) Fails with HTTP 404 or 403 Through Agent Gateway
Symptom:
Symptom A (
HTTP 404onCONNECT): An Agent Runtime container or tool configured withHTTPS_PROXY=https://proxy.corp.internal:443fails on every proxied request withHTTP 404 Not Found(curl: (56) CONNECT tunnel failed, response 404).Symptom B (
gcloudSchema / Validation Error): Importing anAuthzPolicycontainingnetworkRulesfails under GAgcloud, or fails withINVALID_ARGUMENTwhentarget.loadBalancingSchemeorportsis set.Symptom C (
HTTP 403from Downstream Proxy or ADC Metadata Hang): The tunnel reaches Squid / Explicit SWP, which rejects the client with403 Access Denied, or Vertex AI SDK /google-authhangs trying to reach169.254.169.254or*.googleapis.comthrough the proxy.
Cause:
By default, Agent Gateway terminates TLS and routes decrypted streams through an L7 HTTP connection manager, which rejects nested
HTTP CONNECTmethods with404.networkRules(L4 SNI pass-through) is available only in thev1beta1API (gcloud beta), prohibitstarget.loadBalancingSchemewhen targetingagentGateways, and does not supportportsin public schemas.Two-Plane Source IP Split: Inside Agent Gateway's Envoy listener, Agent Runtime connections arrive from Google's internal managed runtime egress CIDR
7.0.0.0/8(while consumer VPC workloads arrive from their VPC CIDR), whereas packets exiting Agent Gateway's PSC-I NIC into your consumer VPC are sourced from your consumer PSC-I Network Attachment subnet CIDR (e.g.,10.20.0.0/24— never7.0.0.0/8). In addition, L4 pass-through bypasses ACTtlsConfig.trustConfigcertificate validation and breaks GCE metadata / Google API mTLS ifNO_PROXYis omitted.
Fix:
Import a
v1beta1L4AuthzPolicymatching the proxy SNI (omitloadBalancingSchemeandports; max 5networkRules, max 10snis, mutually exclusive withhttpRules; either omitfromor include both7.0.0.0/8and your PSC-I CIDR infrom.sources[].ipBlocks):# proxy-l4-authz-policy.yaml name: allow-explicit-proxy-l4 action: ALLOW policyProfile: REQUEST_AUTHZ target: resources: - projects/PROJECT_ID/locations/REGION/agentGateways/AGENT_GATEWAY_NAME networkRules: - to: operations: - snis: - exact: "proxy.corp.internal"gcloud beta network-security authz-policies import allow-explicit-proxy-l4 \ --source=proxy-l4-authz-policy.yaml \ --location=REGION \ --project=PROJECT_IDConfigure TLS on
:443& Allow the Consumer PSC-I Subnet CIDR on the Proxy: Listen on:443with TLS (e.g.,HTTPS_PROXY=https://proxy.corp.internal:443), ensureproxy.corp.internal.resolves viadnsPeeringConfig, and allow your consumer PSC-I Network Attachment subnet CIDR (e.g.,10.20.0.0/24/10.0.0.0/8RFC 1918) in consumer VPC GCE ingress firewall rules and Squidacl localnet src— do not allow7.0.0.0/8on consumer VPC firewalls or Squid ACLs (7.0.0.0/8is used only insideAuthzPolicynetworkRules[].from.sources[].ipBlockswhenfromis configured).Set
NO_PROXYand Container CA Trust: Set bothNO_PROXYandno_proxyto"169.254.169.254,metadata.google.internal,localhost,127.0.0.1,.googleapis.com,googleapis.com", and bundle bothagentGatewayCard.rootCertificatesand your Private CA root intoSSL_CERT_FILE,REQUESTS_CA_BUNDLE, andGRPC_DEFAULT_SSL_ROOTS_FILE_PATH.Security Trade-Off: L4
networkRulesbypasses L7 Agent Gateway policies (IAP/UAP, Model Armor, SGP, andhttpRules) for traffic inside theproxy.corp.internaltunnel; enforce domain/URL policies on the downstream proxy or use BKI #33 (Next-Hop SWP + PBR) when L7 Agent Gateway inspection is required.
35. Cloud DNS Transitive Peering Chain Exceeded (>2 Hops) or Authoritative Root Zone (".") Causing SERVFAIL / NXDOMAIN
Symptom:
Symptom A (
INVALID_ARGUMENTorHTTP 503/SERVFAILon Private Host): ACT or Gateway import fails preflight validation on a multi-hop peered DNS zone, or runtime calls to internal FQDNs fail withHTTP 503/NXDOMAINeven though VMs in the Spoke VPC resolve them.Symptom B (
NXDOMAINon All*.googleapis.com& Public Domains): After configuringdnsPeeringConfig.domains: ["."], every Google API and public internet request fails DNS resolution.
Cause:
Cloud DNS 2-Hop Transitive Limit: Agent Gateway supports transitive Cloud DNS peering up to at most 2 hops (3 VPC networks:
Gateway Tenant VPC → Attached Spoke VPC → Target Hub VPC). Agent Gateway's internal tenant peering consumes Hop 1, leaving at most 1 customer DNS peering hop. If the 2nd-hop VPC chains to another Cloud DNS Peering Zone (a 3rd hop), preflight validation or runtime DNS resolution fails.Authoritative
"."Zone Trap: Peeringdomains: ["."]to an Authoritative private zone for"."makes that zone authoritative for the entire DNS root, returningNXDOMAINfor all unrecorded domains.Schema Split:
AgentConnectivityTemplatednsPeeringConfigaccepts onlydomains(array) andtargetNetwork(string URI with Project ID; passingtargetProjectfails schema validation), whereas inlineAgentGateway.networkConfig.dnsPeeringConfigrequiresdomains,targetNetwork, andtargetProject.
Fix:
Keep DNS peering to at most 1 customer peering hop (
<= 2hops total), ensuring the 2nd-hop Hub VPC hosts an Authoritative Private Zone or uses Cloud DNS Forwarding (inbound/outbound forwarding IPs) rather than another Peering Zone. Where supported in your region, you can pointdnsPeeringConfig.targetNetworkdirectly at the central DNS Hub VPC (grantingroles/dns.peerandroles/dns.readertoservice-GATEWAY_PROJECT_NUMBER@gcp-sa-agentgateway.iam.gserviceaccount.comandroles/dns.reader+roles/compute.networkViewerto the caller on the Hub project).Use
domains: ["."]only with a Cloud DNS Private Forwarding Zone, never an Authoritative private root zone; prefer specific suffixes with trailing dots (e.g.,["corp.internal."]).
36. Consumer VPC Packet Intercept (HTTP 503) & Workforce / Workload Identity Federation (Code 13 / 403) Limits
Symptom:
Symptom A (
HTTP 503on PSC-I Egress): All private or internet egress through an ACT Network Attachment fails withHTTP 503or TLS connection resets despite valid Cloud NAT, firewall rules, and Agent Registry entries.Symptom B (
Code 13or403with WIF Principals): Provisioning Agent Gateway / Registry resources from a Workforce Identity Federation session returnsCode 13(Internal error), or cross-cloud (AWS / Azure) Workload Identity Federation (WIF — Preview) runtime requests fail withCode 13or403 Forbidden.
Cause:
Network Security Packet Intercept Conflict: Consumer VPCs with Network Security Packet Intercept (
InterceptDeploymentGroup) or inline third-party NGFW packet interception matching the PSC-I Network Attachment subnet disrupt Agent Gateway's egress flows.Preview WIF Caller & Claim Limits: Workforce Identity Federation human principals hit
Code 13during Preview gateway/registry management operations (adding broader IAM roles to the WIF user does not bypass this Preview limitation), and referencing unsupported custom WIF attribute expressions in IAP / UAP policies fails runtime evaluation.
Fix:
Exclude the Agent Gateway PSC-I Network Attachment subnet (or use a dedicated egress VPC/subnet) from Network Security Packet Intercept rules.
Execute gateway/registry provisioning using a standard Cloud Identity / Google Workspace user or Google Cloud Service Account, and bind exact supported
principal://iam.googleapis.com/locations/global/workforcePools/...orworkloadIdentityPools/...identifiers in runtime policies.
37. Immediate HTTP 498 After Binding Agent Runtime to Gateway, or Gemini Enterprise Regional UpdateEngine Failures
Symptom:
Symptom A (
HTTP 498): Immediately after binding an Agent Runtime (Reasoning Engine) to an Agent Gateway, agent invocations fail with HTTP status498.Symptom B (Gemini Enterprise
404/400or Bypassed Egress): Attaching an Agent Gateway to a Gemini Enterprise engine inusoreuviadiscoveryengine.googleapis.comfails, or registered connectors/MCP tools bypass the gateway.
Cause:
Binding an Agent Runtime to an Agent Gateway in enforcing mode before registering and authorizing essential platform APIs (Vertex AI, Cloud Resource Manager, IAM Credentials, Telemetry, Sessions / Memory Bank) blocks mandatory runtime platform calls, surfacing as
HTTP 498.Gemini Enterprise engines require regional endpoint host prefixes (
global-,us-, oreu-discoveryengine.googleapis.com) onUpdateEnginePATCHand per-connector opt-in ("use_agent_gateway_egress": true).
Fix:
Deploy the IAP extension in
iamEnforcementMode: "DRY_RUN"first or register the consolidatedgoogleapisservice entry and grantroles/iap.egressor/ UAP allow rules before binding the Agent Runtime to the gateway.For Gemini Enterprise, call
PATCH https://{global-|us-|eu-}discoveryengine.googleapis.com/v1/projects/PROJECT_NUMBER/locations/GE_LOCATION/collections/default_collection/engines/ENGINE_ID?updateMask=agentGatewaySetting.defaultEgressAgentGateway.nameand set"use_agent_gateway_egress": trueon eachDataConnector.
38. Semantic Governance Policy (SGP) Failures: Startup gRPC Crash, Streaming Bypass, Missing Agent in Picker, or metadata Overwrite
Symptom:
Symptom A (Startup gRPC Crash): Agent Runtime crashes on startup after attaching an SGP
AuthzPolicy.Symptom B (Streamed Model Call Returns No Verdict or an Error): Streamed model calls (
:streamGenerateContent,:streamRawPredict) return no verdict or an error, or produce zero evaluation entries inprojects/PROJECT_ID/logs/semantic-governance-policy.Symptom C (Missing Agent): Expected Reasoning Engine is missing from the Console SGP agent selector, or CLI fails with
SEMANTIC_GOVERNANCE_POLICY_AGENT_NOT_CONFIGURED.Symptom D (Unexpected Enforcement After
metadataUpdate): UpdatingsgpUserIntentMatching: "ENABLED"or"DISABLED"unexpectedly activates blocking enforcement (wipingsgpEnforcementMode: "DRY_RUN"), or sessions fail withFAILED_PRECONDITIONwhen callingSGP_DNS_HOSTNAME.
Cause & Fixes:
Mandatory gRPC Exclusion, Non-Streaming Invocation, &
.contains()whenFilter: The LLM in the semantic governance policy engine does not support streamed model responses (:streamGenerateContent,:streamRawPredictreturn no verdict or an error), and omitting gRPC exclusion intercepts internalapplication/grpcstartup calls. Invoke models without streaming and configurehttpRules[].whenon theCONTENT_AUTHZAuthzPolicyusing.contains()(becauserequest.pathincludes query strings):"!request.headers['content-type'].startsWith('application/grpc') && (request.path.contains(':generateContent') || request.path.contains(':rawPredict') || request.path.contains('/v1/messages') || request.path.contains('/chat/completions'))".Agent Eligibility (
AGENT_IDENTITY+agent_gateway_config): Both fields must be set at Reasoning Engine creation time (spec.effectiveIdentitystarting withagents.global.); redeploy ineligible engines.VPC Connectivity, Reserved Subnets, & Service Agent IAM: Ensure consumer VPC subnets do not overlap SGP's reserved internal ranges (
10.0.0.0/24,10.0.1.0/24,10.0.2.0/24), configurednsPeeringConfigsoSGP_DNS_HOSTNAME(dnsRecord) resolves, and grantroles/compute.networkAdmin,roles/dns.admin, androles/cloudtrace.agentto[email protected].Wholesale
updateMask=metadataReplacement: Importing or patchingAuthzExtensionmetadatareplaces the entiremetadatamap. Always include both keys together (e.g.,sgpEnforcementMode: "DRY_RUN"andsgpUserIntentMatching: "ENABLED"or"DISABLED"), and verify verdicts inprojects/PROJECT_ID/logs/semantic-governance-policy.SGP Control-Plane Error Reference (
gcloud beta ai semantic-governance-policies/semantic-governance-policy-engine):SEMANTIC_GOVERNANCE_POLICY_ALREADY_EXISTS/SEMANTIC_GOVERNANCE_POLICY_ETAG_MISMATCH: Useupdatewith the latestetagfromdescribe.SEMANTIC_GOVERNANCE_POLICY_AGENT_REQUIRED/SEMANTIC_GOVERNANCE_POLICY_CONSTRAINT_REQUIRED: Supply--agentand--natural-language-constraint.SEMANTIC_GOVERNANCE_POLICY_AGENT_INVALID_NAME/SEMANTIC_GOVERNANCE_POLICY_MCP_SERVER_INVALID_NAME/SEMANTIC_GOVERNANCE_POLICY_AGENT_REGISTRY_INVALID_NAME/SEMANTIC_GOVERNANCE_POLICY_AGENT_NOT_FOUND/SEMANTIC_GOVERNANCE_POLICY_MCP_SERVER_NOT_FOUND: Pass fullprojects/PROJECT_ID/locations/LOCATION/{agents|mcpServers}/agentregistry-...resource paths registered in the same location.SEMANTIC_GOVERNANCE_POLICY_AGENT_NOT_CONFIGURED: Redeploy agent withAGENT_IDENTITY+agent_gateway_configset at creation time.SEMANTIC_GOVERNANCE_POLICY_REGISTRY_DENIED: Enableagentregistry.googleapis.comand grantroles/agentregistry.viewer.SEMANTIC_GOVERNANCE_POLICY_AGENT_UNSUPPORTED_REGION/SEMANTIC_GOVERNANCE_POLICY_MCP_SERVER_UNSUPPORTED_REGION/SEMANTIC_GOVERNANCE_POLICY_ENGINE_SERVICE_NOT_AVAILABLE_IN_LOCATION/SEMANTIC_GOVERNANCE_POLICY_ENGINE_NOT_ENABLED_IN_REGION: Use a supported SGP region (us-central1,us-east1,us-east4,us-west1,europe-southwest1,europe-west1,europe-west4,europe-west8), setapi_endpoint_overrides/aiplatform, and provision the engine viagcloud beta ai semantic-governance-policy-engine updateuntilstate: ACTIVE.
39. Native MCP AuthzPolicy Blocks Session Handshake (initialize / ping) Due to Missing MATCH_BASE_PROTOCOL_METHODS & ExtensionBinding Double-Invocation
Symptom:
Symptom A (
403on MCP Session Startup): After attaching a native MCP Layer 7AuthzPolicy(httpRules[].to.operations[].mcp,action: ALLOW) paired withDENY_BY_DEFAULT, MCP clients and ADK agents fail immediately during session startup withHTTP 403 Forbiddenbefore callingtools/listortools/call.Symptom B (Duplicate Extension Calls / Double Latency): Requests routed through an Agent Gateway invoke the same
AuthzExtensionorProducerExtensiontwice.
Cause:
MCP clients execute JSON-RPC base lifecycle methods (
initialize,ping,notifications/initialized) before calling tools. InhttpRules[].to.operations[].mcp,baseProtocolMethodsOptiondefaults toSKIP_BASE_PROTOCOL_METHODS, which preventsinitializeandpingfrom matching anALLOWrule whenDENY_BY_DEFAULTis active.ExtensionBindingHierarchy & Coexistence Double-Invocation: WhenExtensionBindingresources (Preview) attach the same extension at both project scope (target.scope.parent: "projects/PROJECT_NUMBER",resourceTypes: "AGENT_GATEWAY") and gateway resource scope (target.resources), both bindings execute on matching requests. Combining a project-scopeExtensionBindingwith a gateway-boundAuthzPolicy(action: CUSTOM) for the same extension likewise invokes it twice (double latency and double billing).
Fix:
Set
baseProtocolMethodsOption: MATCH_BASE_PROTOCOL_METHODSonALLOWrules (keepSKIP_BASE_PROTOCOL_METHODSonDENYrules so denying one tool does not block the MCP session), omittarget.loadBalancingScheme, and re-import withgcloud network-security authz-policies import:name: allow-approved-mcp-tools action: ALLOW policyProfile: REQUEST_AUTHZ target: resources: - projects/PROJECT_ID/locations/REGION/agentGateways/AGENT_GATEWAY_NAME httpRules: - to: operations: - mcp: baseProtocolMethodsOption: MATCH_BASE_PROTOCOL_METHODS methods: - name: "tools/list" - name: "tools/call" params: - exact: "get_order_status"Attach each extension at either project scope (
target.scope) or gateway resource scope (target.resources/AuthzPolicy), never both on the same traffic path.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/agent-platform-troubleshooting · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download agent-platform-troubleshooting.zip