tinyhumansai/openhuman · error
missing value for --params
Error message
missing value for --params
What it means
`openhuman call --params` expects the JSON parameter string as the next token and the flag was the last argument. Params default to "{}" when the flag is omitted entirely, so this only fires when the flag is present but dangling.
Source
Thrown at src/core/cli.rs:474
fn run_call_command(args: &[String]) -> Result<()> {
let mut method: Option<String> = None;
let mut params = "{}".to_string();
let mut i = 0usize;
while i < args.len() {
match args[i].as_str() {
"--method" => {
method = Some(
args.get(i + 1)
.ok_or_else(|| anyhow::anyhow!("missing value for --method"))?
.clone(),
);
i += 2;
}
"--params" => {
params = args
.get(i + 1)
.ok_or_else(|| anyhow::anyhow!("missing value for --params"))?
.clone();
i += 2;
}
"-h" | "--help" => {
println!("Usage: openhuman call --method <name> [--params '<json>']");
return Ok(());
}
other => return Err(anyhow::anyhow!("unknown call arg: {other}")),
}
}
let method = method.ok_or_else(|| anyhow::anyhow!("--method is required"))?;
let params = parse_json_params(¶ms).map_err(anyhow::Error::msg)?;
// Raw calls bypass namespace parsing, but not the configured memory-driver
// binding. Without this gate an absent capability could still reach a
// destructive embedded handler because plain CLI invocations have no
// ambient CoreContext to filter the registry.View on GitHub (pinned to a221052e0d)
Solutions
- Pass the JSON as one quoted token: `--params '{"key":"value"}'`
- Or omit `--params` to send the default empty object {}
Example fix
# before
openhuman call --method openhuman.config_get --params
# after
openhuman call --method openhuman.config_get --params '{"key":"value"}' Defensive patterns
Strategy: validation
Validate before calling
# bash: validate JSON and omit empty params
if [ -n "${PARAMS:-}" ]; then
printf '%s' "$PARAMS" | jq -e . >/dev/null 2>&1 \
|| { echo "params must be valid JSON" >&2; exit 2; }
exec openhuman call --method "$METHOD" --params "$PARAMS"
fi
exec openhuman call --method "$METHOD" # default params {} Prevention
- Omit --params entirely to send {} rather than passing it with no value
- Single-quote JSON payloads so the shell cannot split or swallow them
- Validate the JSON with jq -e . before handing it to the CLI
When it happens
Trigger: `openhuman call --method openhuman.x --params` as the final token; quoting mistakes that leave the JSON argument off the command line.
Common situations: Shell quoting of JSON strings gone wrong (unbalanced quotes swallowing the value); templated invocations where the params variable is appended as a flag but its expansion is lost.
Related errors
- missing value for --method
- unknown call arg: {other}
- --method is required
- audio blob is empty
- voice_not_compiled
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/3d8800226c81a7c5.
Report an issue: GitHub.