tinyhumansai/openhuman · error · anyhow::Error
unknown agent subcommand
Error message
unknown agent subcommand '{other}'. Run `openhuman agent --help`. What it means
Dispatch fallback in run_agent_command: the first argument to `openhuman agent <sub>` matched none of the known subcommands (dump-prompt, dump-all, list, …) and was not a help form, so the match's catch-all arm returns an error pointing the user at `openhuman agent --help`. Purely a CLI usage error — nothing was executed.
Solutions
- Run `openhuman agent --help` to see valid subcommands
- Check for typos in the subcommand
- Upgrade if the subcommand you expected exists in a newer version
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/agent_cli.rs:42 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/77a5a49b8fbf4662.
Report an issue: GitHub.
Appendix: 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 7491200858)