tinyhumansai/openhuman · error

missing value for --host

Error message

missing value for --host

What it means

`openhuman run --host` expects the bind address as the next token and the flag was the last argument, so `args.get(i + 1)` returned None. Same parser shape as --port: the value is consumed unconditionally, so end-of-args is the only way to reach this message.

Source

Thrown at src/core/cli.rs:384

    let mut i = 0usize;

    // Manual argument parsing loop for specific flags.
    while i < args.len() {
        match args[i].as_str() {
            "--port" => {
                let raw = args
                    .get(i + 1)
                    .ok_or_else(|| anyhow::anyhow!("missing value for --port"))?;
                port = Some(
                    raw.parse::<u16>()
                        .map_err(|e| anyhow::anyhow!("invalid --port: {e}"))?,
                );
                i += 2;
            }
            "--host" => {
                host = Some(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow::anyhow!("missing value for --host"))?
                        .clone(),
                );
                i += 2;
            }
            "--jsonrpc-only" => {
                socketio_enabled = false;
                i += 1;
            }
            "--headless-api" => {
                socketio_enabled = false;
                headless_api = true;
                i += 1;
            }
            "-v" | "--verbose" => {
                verbose = true;
                i += 1;
            }
            "-h" | "--help" => {

View on GitHub (pinned to a221052e0d)

Solutions

  1. Pass the address: `openhuman run --host 0.0.0.0` (or 127.0.0.1)
  2. Or omit the flag to use the default 127.0.0.1 / OPENHUMAN_CORE_HOST

Example fix

# before
openhuman run --host
# after
openhuman run --host 127.0.0.1
Defensive patterns

Strategy: validation

Validate before calling

# bash: only emit --host when a value is present
args=(run)
[ -n "${HOST:-}" ] && args+=(--host "$HOST")
exec openhuman "${args[@]}"

Prevention

When it happens

Trigger: `openhuman run --host` as the final token; script conditionals appending the flag without a value.

Common situations: Half-edited command lines; scripts templating host/port separately with one missing; docs examples that split flag and value.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/6d9a881c708269b7. Report an issue: GitHub.