BerriAI/litellm · error · AgentRunError

Nothing to run.

Error message

Nothing to run.

What it means

Raised by the CLI agent-launch pre-flight when the resolved command sequence is empty — the agent config supplied no executable to hand off to. The launcher is about to exec a process; with no command there is nothing to run, so the handoff aborts immediately with AgentRunError before any proxy communication or environment wiring happens.

Source

Thrown at litellm/proxy/client/cli/commands/agents.py:277

    api_key: str,
    command: Sequence[str],
    *,
    skip_verify: bool = False,
    base_env: Mapping[str, str] | None = None,
    which: Callable[[str], str | None] = shutil.which,
    verify: Callable[[str, str], None] = verify_proxy_key,
    launcher: Callable[[str, Sequence[str], Mapping[str, str]], None] = _hand_off,
    reattach_terminal: Callable[[], None] | None = None,
) -> None:
    """Validate, wire the environment, and hand off to the agent.

    On success this never returns: POSIX replaces the current process, Windows
    waits on the agent and exits with its status. Raises AgentRunError for
    missing binaries, an unreachable proxy, or a rejected key.
    reattach_terminal, when given, runs just before handoff to restore stdin.
    """
    if not command:
        raise AgentRunError("Nothing to run.")

    _, profiles = agent_profile(command[0])
    binary: Final = which(command[0])
    if binary is None:
        docs: Final = _INSTALL_DOCS.get(os.path.basename(command[0]))
        hint: Final = f" Install it first: {docs}" if docs else ""
        raise AgentRunError(f"Could not find `{command[0]}` on your PATH.{hint}")

    if not skip_verify:
        verify(base_url, api_key)

    env: Final = build_agent_env(
        base_env if base_env is not None else os.environ,
        base_url,
        api_key,
        profiles,
    )
    extra_args: Final = agent_launch_args(command[0], base_url)

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Provide a command or prompt for the agent to run.

Example fix

lite agents run -- <command>
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/client/cli/commands/agents.py:277 when the library encounters an invalid state.

Common situations: The agents command was invoked without anything to execute.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/9f55a3680b4bae43. Report an issue: GitHub.