🔴 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:
- Install
google-adk (version 2.5.0).
- Run
adk deploy cloud_run --project=<PROJECT_ID> --region=<REGION> --service_name=<SERVICE_NAME> --app_name=<APP_NAME> <PATH_TO_AGENT>
- 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?:
🔴 Required Information
Describe the Bug:
When deploying an agent to Google Cloud Run using
adk deploy cloud_run, the ADK CLI executesgcloud run deploywith a hardcoded--sandbox-launcherflag. However,--sandbox-launcheris not a valid flag on the General Availability (GA) track ofgcloud run deploy(it is only supported undergcloud alphaorgcloud beta). As a result,gcloudfails withERROR: (gcloud.run.deploy) unrecognized arguments: --sandbox-launcherand exit code 2, causing deployment to fail.Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:
google-adk(version 2.5.0).adk deploy cloud_run --project=<PROJECT_ID> --region=<REGION> --service_name=<SERVICE_NAME> --app_name=<APP_NAME> <PATH_TO_AGENT>gcloud.Expected Behavior:
adk deploy cloud_runshould either use supported GA flags when executinggcloud run deploy, or invokegcloud beta run deploy/gcloud alpha run deployif--sandbox-launcheris required.Observed Behavior:
Environment Details:
pip show google-adk): 2.5.0python -V): Python 3.14.0gcloud --version): 578.0.0Model Information:
🟡 Optional Information
Providing this information greatly speeds up the resolution process.
Regression:
5b1088a
Logs:
Screenshots / Video:
N/A
Additional Context:
In
google/adk/cli/cli_deploy.pyaround line 801,to_cloud_run()constructs the command array as follows:adk-python/src/google/adk/cli/cli_deploy.py
Lines 788 to 803 in 6bab08f
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:
How often has this issue occurred?: