tinyhumansai/openhuman · warning
unknown agent subcommand '{other}'. Run `openhuman agent --h
Error message
unknown agent subcommand '{other}'. Run `openhuman agent --help`. What it means
Thrown by run_agent_command (src/core/agent_cli.rs) when the first token after `openhuman agent` matches none of the supported subcommands (dump-prompt, dump-all, list) and is not a help token. It is a pure argument-dispatch failure; the error text points at `openhuman agent --help`.
Source
Thrown at src/core/agent_cli.rs:42
use std::path::PathBuf;
use crate::openhuman::agent::debug::{
dump_agent_prompt, dump_all_agent_prompts, write_prompt_dumps, DumpPromptOptions, DumpedPrompt,
};
use crate::openhuman::agent::harness::definition::AgentDefinitionRegistry;
/// Entry point for `openhuman agent <subcommand>`.
pub fn run_agent_command(args: &[String]) -> Result<()> {
if args.is_empty() || is_help(&args[0]) {
print_agent_help();
return Ok(());
}
match args[0].as_str() {
"dump-prompt" => run_dump_prompt(&args[1..]),
"dump-all" => run_dump_all(&args[1..]),
"list" => run_list(&args[1..]),
other => Err(anyhow!(
"unknown agent subcommand '{other}'. Run `openhuman agent --help`."
)),
}
}
// ---------------------------------------------------------------------------
// dump-all
// ---------------------------------------------------------------------------
struct DumpAllFlags {
out: PathBuf,
workspace: Option<PathBuf>,
model: Option<String>,
verbose: bool,
}
fn parse_dump_all_flags(args: &[String]) -> Result<DumpAllFlags> {
let mut out: Option<PathBuf> = None;View on GitHub (pinned to a221052e0d)
Solutions
- Run `openhuman agent --help` and use one of the listed subcommands: dump-prompt, dump-all, list.
- Check spelling: `dump-all` and `dump-prompt` are hyphenated, not underscored.
- Put global options before the subcommand only if the parent parser accepts them there; the agent dispatcher expects the subcommand first.
Example fix
# before openhuman agent dumpall # after openhuman agent dump-all --out ./prompts
Defensive patterns
Strategy: validation
Validate before calling
const AGENT_SUBCOMMANDS: &[&str] = &["dump-prompt", "dump-all", "list"];
if !AGENT_SUBCOMMANDS.contains(&args[0].as_str()) {
eprintln!("unknown agent subcommand; valid: {AGENT_SUBCOMMANDS:?}");
return;
} Try / catch
if let Err(e) = run_agent_command(&args) {
if e.to_string().contains("unknown agent subcommand") {
print_agent_help(); // recover by showing usage instead of a bare error
}
} Prevention
- Run `openhuman agent --help` before scripting an unfamiliar subcommand.
- In automation, pin to a known CLI version so subcommand sets do not drift.
- Use exact hyphenated spellings (dump-all, dump-prompt).
When it happens
Trigger: Running e.g. `openhuman agent prompts`, `openhuman agent dump`, `openhuman agent ls`, or misspelling dump-prompt/dump-all/list. Also passing a global flag first (`openhuman agent --model x dump-prompt`) so the flag token is treated as the subcommand.
Common situations: Exploring the CLI from memory, tab-completion gaps, scripts referencing a subcommand renamed or added in a newer version, or copy-pasting docs for a different build.
Related errors
- missing value for --out
- missing value for --workspace
- missing value for --model
- unknown dump-all arg: {other}
- --out <dir> is required
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/77a5a49b8fbf4662.
Report an issue: GitHub.