Skip to content

agents-cli run passes entire project root contents as positional arguments to adk web, causing startup failure #38

@merriam-tao

Description

@merriam-tao

What happened?

Environment

agents-cli version: v0.5.0
OS: Windows
Shell: PowerShell
Package manager: uv (project includes uv.lock)
Project structure at root: app/, Dockerfile, GEMINI.md, pyproject.toml, README.md, tests/, uv.lock

Summary
Running agents-cli run fails to start the local playground server. The underlying adk web invocation receives every file and folder in the project root as separate positional arguments, instead of receiving the single agent directory name (app). This causes adk web's argument parser to reject the call.

Steps to Reproduce

Create or use an ADK agent project with the following at the root: app/, Dockerfile, GEMINI.md, pyproject.toml, README.md, tests/, uv.lock.
From the project root, run:

agents-cli run "How are you?"

Observe the command times out attempting to start the local server, then fails.

Actual Behavior
Error: Local server did not start within 30s.
Check logs: .google-agents-cli/run_server.log
Checking the log file shows the actual root cause:
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)

What did you expect to happen?

Expected Behavior
agents-cli run should invoke adk web with only the correct agent directory (e.g. adk web app), not every file/folder in the project root.
Workaround Confirmed
Bypassing agents-cli and invoking adk web directly works correctly:
uv run adk web app
This starts the server successfully:
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
This confirms the issue is isolated to how agents-cli run constructs its internal call to adk web — the local Python/uv environment, dependencies, and API credentials are all functioning correctly.

Client information

Client Information

Run agents-cli info to output debugging information about your client.

Command Output / Logs

No response

Anything else we need to know?

Suggested Fix
When agents-cli run builds the adk web command, it should pass only the resolved agent subdirectory (likely app, or whatever is configured as the agent directory for the project) as the single positional argument, rather than expanding/passing all root-level files and folders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions