tinyhumansai/openhuman · warning

--agent <id> is required (e.g. `orchestrator`, `integrations

Error message

--agent <id> is required (e.g. `orchestrator`, `integrations_agent`, `welcome`)

What it means

Thrown by run_dump_prompt after parsing succeeded but no `--agent`/`-a` was given. The agent id is mandatory for dump-prompt; unlike dump-all there is no default, and the error lists example ids (orchestrator, integrations_agent, welcome).

Source

Thrown at src/core/agent_cli.rs:229

            "-v" | "--verbose" => {
                out.verbose = true;
                i += 1;
            }
            "-h" | "--help" => {
                print_dump_prompt_help();
                std::process::exit(0);
            }
            other => return Err(anyhow!("unknown dump-prompt arg: {other}")),
        }
        let _ = i; // silence unused-warning in the `help` branch
    }
    Ok(out)
}

fn run_dump_prompt(args: &[String]) -> Result<()> {
    let flags = parse_dump_flags(args)?;
    let agent = flags.agent.clone().ok_or_else(|| {
        anyhow!("--agent <id> is required (e.g. `orchestrator`, `integrations_agent`, `welcome`)")
    })?;

    if agent == "integrations_agent" && flags.toolkit.is_none() {
        return Err(anyhow!(
            "--toolkit <slug> is required when --agent is `integrations_agent` \
             (e.g. `--toolkit gmail`). Run `composio list_connection` to see active slugs."
        ));
    }

    init_quiet_logging(flags.verbose);

    log::debug!(
        "[agent-cli] run_dump_prompt entry: agent={} toolkit={:?} workspace={:?} model={:?}",
        agent,
        flags.toolkit,
        flags.workspace,
        flags.model
    );

View on GitHub (pinned to a221052e0d)

Solutions

  1. Add `--agent <id>` with a real id; list valid ids via `openhuman agent list`.
  2. If you want every agent's prompt, use `openhuman agent dump-all --out <dir>` instead.

Example fix

# before
openhuman agent dump-prompt --json

# after
openhuman agent dump-prompt --agent orchestrator --json
Defensive patterns

Strategy: validation

Validate before calling

# shell: require the agent id before invoking
: "${AGENT_ID:?AGENT_ID must be set; run `openhuman agent list` for ids}"
openhuman agent dump-prompt --agent "$AGENT_ID"

Try / catch

match run_agent_command(&args) {
    Err(e) if e.to_string().contains("--agent <id> is required") => {
        eprintln!("pick an id from `openhuman agent list` and pass --agent <id>");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Running `openhuman agent dump-prompt` bare or with only optional flags (--json, --model, -v).

Common situations: Expecting dump-prompt to dump all agents (that is dump-all's job), or a script that conditionally injects --agent and the condition failed.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/e391ae18eacbc676. Report an issue: GitHub.