tinyhumansai/openhuman · error · anyhow::Error

--agent is required (e.g. `orchestrator`…

Error message

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

What it means

Post-parse validation in run_dump_prompt: flags were consumed but --agent was absent, so there is no agent whose turn-1 system prompt should be rendered. The message names valid example ids (orchestrator, integrations_agent, welcome) to make the fix immediate; the command refuses to guess a default agent.

Solutions

  1. Add `--agent <id>` to the command, e.g. `--agent orchestrator`
  2. List available agents with `openhuman agent list` if unsure of the id
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/agent_cli.rs:229 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: 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 7491200858)