tinyhumansai/openhuman · error
unknown query arg
Error message
unknown query arg: {other} What it means
Catch-all arm of the `openhuman memory query` argument loop. Any token that is not --namespace/-n, --query/-q, --limit/-l, -v/--verbose or -h/--help lands here and aborts parsing. It is a generic usage guard against typos or misplaced values, e.g. a forgotten value leaving a stray flag token.
Solutions
- Use only the documented flags: --namespace/-n, --query/-q, --limit/-l, -v/--verbose.
- Run `openhuman memory query --help` for the exact usage line.
- Ensure every flag that takes a value is followed by that value so it is not misparsed as an unknown flag.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/memory_cli.rs:337 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/9d174590a5a6bc0b.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/memory_cli.rs:337
query = Some(next_arg(args, &mut i, "--query")?);
}
"--limit" | "-l" => {
let raw = next_arg(args, &mut i, "--limit")?;
limit = raw
.parse::<u32>()
.map_err(|e| anyhow::anyhow!("invalid --limit: {e}"))?;
}
"-v" | "--verbose" => {
verbose = true;
i += 1;
}
"-h" | "--help" => {
println!(
"Usage: openhuman memory query --namespace <ns> --query <text> [--limit <n>] [-v]"
);
return Ok(());
}
other => return Err(anyhow::anyhow!("unknown query arg: {other}")),
}
}
let namespace =
namespace.ok_or_else(|| anyhow::anyhow!("--namespace is required for query"))?;
let query = query.ok_or_else(|| anyhow::anyhow!("--query is required"))?;
crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()?;
let result = rt.block_on(async {
let client = create_memory_client("query").await?;
client
.query_namespace(&namespace, &query, limit)
.awaitView on GitHub (pinned to 7491200858)