{"record":{"id":"e391ae18eacbc676","repo":"tinyhumansai/openhuman","slug":"agent-id-is-required-e-g-orchestrator-in","errorCode":null,"errorMessage":"--agent <id> is required (e.g. `orchestrator`, `integrations_agent`, `welcome`)","messagePattern":"--agent <id> is required \\(e\\.g\\. `orchestrator`, `integrations_agent`, `welcome`\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/agent_cli.rs","lineNumber":229,"sourceCode":"            \"-v\" | \"--verbose\" => {\n                out.verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                print_dump_prompt_help();\n                std::process::exit(0);\n            }\n            other => return Err(anyhow!(\"unknown dump-prompt arg: {other}\")),\n        }\n        let _ = i; // silence unused-warning in the `help` branch\n    }\n    Ok(out)\n}\n\nfn run_dump_prompt(args: &[String]) -> Result<()> {\n    let flags = parse_dump_flags(args)?;\n    let agent = flags.agent.clone().ok_or_else(|| {\n        anyhow!(\"--agent <id> is required (e.g. `orchestrator`, `integrations_agent`, `welcome`)\")\n    })?;\n\n    if agent == \"integrations_agent\" && flags.toolkit.is_none() {\n        return Err(anyhow!(\n            \"--toolkit <slug> is required when --agent is `integrations_agent` \\\n             (e.g. `--toolkit gmail`). Run `composio list_connection` to see active slugs.\"\n        ));\n    }\n\n    init_quiet_logging(flags.verbose);\n\n    log::debug!(\n        \"[agent-cli] run_dump_prompt entry: agent={} toolkit={:?} workspace={:?} model={:?}\",\n        agent,\n        flags.toolkit,\n        flags.workspace,\n        flags.model\n    );","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/agent_cli.rs#L211-L247","documentation":"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).","triggerScenarios":"Running `openhuman agent dump-prompt` bare or with only optional flags (--json, --model, -v).","commonSituations":"Expecting dump-prompt to dump all agents (that is dump-all's job), or a script that conditionally injects --agent and the condition failed.","solutions":["Add `--agent <id>` with a real id; list valid ids via `openhuman agent list`.","If you want every agent's prompt, use `openhuman agent dump-all --out <dir>` instead."],"exampleFix":"# before\nopenhuman agent dump-prompt --json\n\n# after\nopenhuman agent dump-prompt --agent orchestrator --json","handlingStrategy":"validation","validationCode":"# shell: require the agent id before invoking\n: \"${AGENT_ID:?AGENT_ID must be set; run `openhuman agent list` for ids}\"\nopenhuman agent dump-prompt --agent \"$AGENT_ID\"","typeGuard":null,"tryCatchPattern":"match run_agent_command(&args) {\n    Err(e) if e.to_string().contains(\"--agent <id> is required\") => {\n        eprintln!(\"pick an id from `openhuman agent list` and pass --agent <id>\");\n    }\n    other => other?,\n}","preventionTips":["dump-prompt requires --agent; use dump-all when you want every agent.","Discover valid ids with `openhuman agent list` instead of guessing."],"tags":["rust","cli","argument-parsing","required-argument"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}