Repository navigation
Description
What happened?
Running agents-cli playground on Windows crashes with Error: Got unexpected extra arguments showing files from the current working directory.
Steps to Reproduce
- Create an agent project on Windows.
- Open a terminal inside the project root folder.
- Run
agents-cli install - Run
agents-cli playground
What did you expect to happen?
The local playground server starts successfully and hosts the web UI at http://127.0.0.1:8080/dev-ui/
Client information
CLI version: 0.5.0
CLI install path: C:\Users\abdul\AppData\Roaming\uv\tools\google-agents-cli\Lib\site-packages\google\agents\cli
OS info: Windows-11-10.0.26200-SP0
Installed skills: none
Project root: C:\Users\abdul\OneDrive\Desktop\Comp Lang NEW\Antigravity - agy-cli-projects\weather-assistant
Project name: weather-assistant
Deployment target: none
Agent directory: app
Region: us-east1
Command Output / Logs
agents-cli playground
Starting your agent playground...
Running command: uv run adk web . --host 127.0.0.1 --port 8080 --allow_origins '*' --reload_agents
Will be available at: http://127.0.0.1:8080/dev-ui/?app=app
Usage: adk web [OPTIONS] [AGENTS_DIR]
Try 'adk web --help' for help.
Error: Got unexpected extra arguments (app Dockerfile GEMINI.md pyproject.toml README.md tests uv.lock)
agents-cli v0.5.0
Error: Failed to start playground (exit code 2)
Anything else we need to know?
Cause:
When Python launches the command via uv run, the adk.exe launcher wrapper (which is compiled with MSVC's setargv.obj) automatically expands the * wildcard in --allow_origins "*" into all filenames in the current directory before passing it to Python. Click then interprets these filenames as unexpected positional arguments.
Proposed Fix:
In google/agents/cli/dev/cmd_playground.py, escape/quote the asterisk argument on Windows to prevent the launcher's C runtime from expanding it:
browser_host = "127.0.0.1" if host == "0.0.0.0" else host
url = f"http://{browser_host}:{port}/dev-ui/?app={cfg.agent_directory}"
+ import sys
+ allow_origins = '"*"' if sys.platform == "win32" else "*"
args = [
"uv",
"run",
@@ -66,7 +66,7 @@
"--port",
str(port),
"--allow_origins",
- "*",
+ allow_origins,
]
if reload_agents:
args.append("--reload_agents")
---
*Contribution & Recognition:*
* I have signed the Google Individual CLA (under the name Abdullah).
* Since this fix resolves a blocker for Windows users, I would appreciate being credited for this contribution when the fix is applied.
* Once merged, I would also love to be nominated for the Google Open Source Peer Bonus program.
Activity
[-]agents-cli playground fails on Windows due to wildcard expansion of --allow_origins "*"[/-][+][Bug] agents-cli playground fails on Windows due to wildcard expansion of --allow_origins "*"[/+]sushicw commentedon Jun 18, 2026
Thank you for the report!
This actually appears to be an ADK cli bug, the same behavior occurs if you do
uv run adk web . --host 127.0.0.1 --port 8080 --allow_origins '*' --reload_agentsdirectly and don't involveagents-cliat all. A quoted * should not be getting expanded.In the meantime, we're adding a workaround in
agents-clito unblock Windows usage.Abdullah-k0de commentedon Jun 18, 2026
Thank you for the quick response and for self-assigning this!
Yes, it is indeed an issue with how the compiled
adk.exelauncher wrapper handles argument parsing/expansion on Windows. I'm glad the workaround will be added toagents-clito unblock Windows users in the meantime.Also, I have just filed another issue regarding two other Windows-specific blockers in the
agents-cli runlocal server lifecycle (a startup crash0xc0000142and a shutdown crashWNOHANGin_local_server.py), along with the proposed fixes.Since I've signed the CLA, I'm excited to contribute and help stabilize the Windows experience. I appreciate the support and would love to collaborate on future fixes/nominations!
sushicw commentedon Jun 22, 2026
Fix released in https://github.com/google/agents-cli/releases/tag/v0.5.1