Skip to content

ADK Cloud Run deployment fails with unrecognized argument '--sandbox-launcher' on gcloud GA track #6511

Description

@KenTandrian

🔴 Required Information

Describe the Bug:
When deploying an agent to Google Cloud Run using adk deploy cloud_run, the ADK CLI executes gcloud run deploy with a hardcoded --sandbox-launcher flag. However, --sandbox-launcher is not a valid flag on the General Availability (GA) track of gcloud run deploy (it is only supported under gcloud alpha or gcloud beta). As a result, gcloud fails with ERROR: (gcloud.run.deploy) unrecognized arguments: --sandbox-launcher and exit code 2, causing deployment to fail.

Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:

  1. Install google-adk (version 2.5.0).
  2. Run adk deploy cloud_run --project=<PROJECT_ID> --region=<REGION> --service_name=<SERVICE_NAME> --app_name=<APP_NAME> <PATH_TO_AGENT>
  3. Observe the deployment failure output from gcloud.

Expected Behavior:
adk deploy cloud_run should either use supported GA flags when executing gcloud run deploy, or invoke gcloud beta run deploy / gcloud alpha run deploy if --sandbox-launcher is required.

Observed Behavior:

Deploying to Cloud Run...
ERROR: (gcloud.run.deploy) unrecognized arguments:
  
 --sandbox-launcher flag is available in one or more alternate release tracks. Try:

  gcloud alpha run deploy --sandbox-launcher
  gcloud beta run deploy --sandbox-launcher

  --sandbox-launcher
  To search the help text of gcloud commands, run:
  gcloud help -- SEARCH_TERMS
Cleaning up the temp folder: /tmp/cloud_run_deploy_src/20260729_221957
Deploy failed: Command '['gcloud', 'run', 'deploy', '<SERVICE_NAME>', '--source', '/tmp/cloud_run_deploy_src/20260729_221957', '--project', '<PROJECT_ID>', '--region', 'asia-southeast1', '--port', '8000', '--verbosity', 'info', '--sandbox-launcher', '--labels', 'created-by=adk']' returned non-zero exit status 2.

Environment Details:

  • ADK Library Version (pip show google-adk): 2.5.0
  • Desktop OS: macOS
  • Python Version (python -V): Python 3.14.0
  • Google Cloud SDK Version (gcloud --version): 578.0.0

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: Gemini 3.6 Flash (anyway, this is actually a CLI Deployment issue)

🟡 Optional Information

Providing this information greatly speeds up the resolution process.

Regression:
5b1088a

Logs:

Deploying to Cloud Run...
ERROR: (gcloud.run.deploy) unrecognized arguments:
  
 --sandbox-launcher flag is available in one or more alternate release tracks. Try:

  gcloud alpha run deploy --sandbox-launcher
  gcloud beta run deploy --sandbox-launcher

  --sandbox-launcher
  To search the help text of gcloud commands, run:
  gcloud help -- SEARCH_TERMS
Cleaning up the temp folder: /tmp/cloud_run_deploy_src/20260729_221957
Deploy failed: Command '['gcloud', 'run', 'deploy', '<SERVICE_NAME>', '--source', '/tmp/cloud_run_deploy_src/20260729_221957', '--project', '<PROJECT_ID>', '--region', 'asia-southeast1', '--port', '8000', '--verbosity', 'info', '--sandbox-launcher', '--labels', 'created-by=adk']' returned non-zero exit status 2.

Screenshots / Video:
N/A

Additional Context:
In google/adk/cli/cli_deploy.py around line 801, to_cloud_run() constructs the command array as follows:

gcloud_cmd = [
_GCLOUD_CMD,
'run',
'deploy',
service_name,
'--source',
temp_folder,
'--project',
project,
*region_options,
'--port',
str(port),
'--verbosity',
log_level.lower() if log_level else verbosity,
'--sandbox-launcher',
]

Changing _GCLOUD_CMD, 'run', 'deploy' to _GCLOUD_CMD, 'beta', 'run', 'deploy', or removing '--sandbox-launcher', might allows the command to execute successfully.

Minimal Reproduction Code:

adk deploy cloud_run \
  --project=<PROJECT_ID> \
  --region=<REGION> \
  --service_name=<SERVICE_NAME> \
  --app_name=<APP_NAME> \
  ./<AGENT_FOLDER>

How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

Labels

cli[Component] This issue is related to clirequest clarification[Status] The maintainer need clarification or more information from the author

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions