tinyhumansai/openhuman · error · anyhow::Error

unknown run arg

Error message

unknown run arg: {other}

What it means

CLI argument parsing in run_server_command: an unrecognized argument was passed to the run subcommand (accepted: --host, --port, --jsonrpc-only/--headless-api, -v/--verbose, -h/--help). The offending token is in `{other}`; run `openhuman run --help` for the flag list.

Solutions

  1. Check spelling against `openhuman run --help`
  2. Remove the unrecognized argument
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/cli.rs:418 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/57e49164f95851aa. Report an issue: GitHub.

Appendix: source

Thrown at src/core/cli.rs:418

                i += 1;
            }
            "-h" | "--help" => {
                println!("Usage: openhuman run [--host <addr>] [--port <u16>] [--jsonrpc-only|--headless-api] [-v|--verbose]");
                println!();
                println!(
                    "  --host <addr>    Bind address (default: 127.0.0.1 or OPENHUMAN_CORE_HOST)"
                );
                println!(
                    "  --port <u16>     Listen address port (default: 7788 or OPENHUMAN_CORE_PORT)"
                );
                println!("  --jsonrpc-only   HTTP JSON-RPC only; disable Socket.IO");
                println!("  --headless-api   HTTP JSON-RPC only; disable all background services");
                println!("  -v, --verbose    Shorthand for RUST_LOG=debug when RUST_LOG is unset");
                println!();
                println!("Logging: set RUST_LOG (e.g. RUST_LOG=debug openhuman run). Default level is info.");
                return Ok(());
            }
            other => return Err(anyhow::anyhow!("unknown run arg: {other}")),
        }
    }

    crate::core::logging::init_for_cli_run(verbose, log_scope);

    // Initialize the Tokio multi-threaded runtime.
    //
    // A single agent turn is a very large async state machine (system prompt +
    // hundreds of tool specs + the nested provider/tool loop), and delegating
    // to a sub-agent runs another full turn one level down. Even with the inner
    // sub-agent future boxed (`subagent_runner::ops`), that nesting overflows
    // tokio's default 2 MiB worker-thread stack and aborts the whole process
    // (SIGABRT: "thread 'tokio-rt-worker' has overflowed its stack"), taking
    // the JSON-RPC server down mid-request. Give workers a roomier stack.
    let rt = tokio::runtime::Builder::new_multi_thread()
        .enable_all()
        .thread_stack_size(crate::core::runtime::AGENT_WORKER_STACK_BYTES)
        .max_blocking_threads(crate::core::runtime::MAX_BLOCKING_THREADS)

View on GitHub (pinned to 7491200858)