{"record":{"id":"57e49164f95851aa","repo":"tinyhumansai/openhuman","slug":"unknown-run-arg-other","errorCode":null,"errorMessage":"unknown run arg: {other}","messagePattern":"unknown run arg: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":418,"sourceCode":"                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman run [--host <addr>] [--port <u16>] [--jsonrpc-only|--headless-api] [-v|--verbose]\");\n                println!();\n                println!(\n                    \"  --host <addr>    Bind address (default: 127.0.0.1 or OPENHUMAN_CORE_HOST)\"\n                );\n                println!(\n                    \"  --port <u16>     Listen address port (default: 7788 or OPENHUMAN_CORE_PORT)\"\n                );\n                println!(\"  --jsonrpc-only   HTTP JSON-RPC only; disable Socket.IO\");\n                println!(\"  --headless-api   HTTP JSON-RPC only; disable all background services\");\n                println!(\"  -v, --verbose    Shorthand for RUST_LOG=debug when RUST_LOG is unset\");\n                println!();\n                println!(\"Logging: set RUST_LOG (e.g. RUST_LOG=debug openhuman run). Default level is info.\");\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown run arg: {other}\")),\n        }\n    }\n\n    crate::core::logging::init_for_cli_run(verbose, log_scope);\n\n    // Initialize the Tokio multi-threaded runtime.\n    //\n    // A single agent turn is a very large async state machine (system prompt +\n    // hundreds of tool specs + the nested provider/tool loop), and delegating\n    // to a sub-agent runs another full turn one level down. Even with the inner\n    // sub-agent future boxed (`subagent_runner::ops`), that nesting overflows\n    // tokio's default 2 MiB worker-thread stack and aborts the whole process\n    // (SIGABRT: \"thread 'tokio-rt-worker' has overflowed its stack\"), taking\n    // the JSON-RPC server down mid-request. Give workers a roomier stack.\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .thread_stack_size(crate::core::runtime::AGENT_WORKER_STACK_BYTES)\n        .max_blocking_threads(crate::core::runtime::MAX_BLOCKING_THREADS)","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L400-L436","documentation":"`openhuman run` accepts an exact set of tokens — `--port <u16>`, `--host <addr>`, `--jsonrpc-only`, `--headless-api`, `-v`/`--verbose`, `-h`/`--help` — matched by exact string. Anything else, including equals-joined forms and typos, falls to the catch-all arm and is reported verbatim. The strictness is deliberate: guessing flags would misconfigure a long-running server.","triggerScenarios":"`openhuman run --port=7788` (equals form unsupported); `--jsonrpc_only` (underscore typo); `--headless` (shortened guess); stray positional arguments after `run`.","commonSituations":"Flag conventions carried over from other CLIs that accept `key=value`; typos; renamed flags across versions; leftover positional text from script templating.","solutions":["Run `openhuman run --help` and copy the exact flags listed","Use the space-separated form (`--port 7788`), not `--port=7788`","Check spelling of the boolean flags: exactly `--jsonrpc-only`, `--headless-api`, `-v`/`--verbose`"],"exampleFix":"# before\nopenhuman run --port=7788 --jsonrpc-only\n# after\nopenhuman run --port 7788 --jsonrpc-only","handlingStrategy":"validation","validationCode":"# bash: construct run args from a whitelist instead of forwarding raw user input\nvalid_flags=(--jsonrpc-only --headless-api -v --verbose)\nargs=(run)\nfor a in \"$@\"; do\n  case \"$a\" in --port|--host) ;; # handled with their values below\n    \"${valid_flags[@]}\") args+=(\"$a\") ;;\n    *) echo \"unsupported run flag: $a\" >&2; exit 2 ;;\n  esac\ndone\nopenhuman \"${args[@]}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["This CLI takes space-separated flags only — never generate --flag=value tokens","Copy exact flag spellings from `openhuman run --help` (--jsonrpc-only, --headless-api, -v/--verbose)","Do not forward unvalidated user input as CLI tokens; whitelist the ones you accept"],"tags":["cli","argument-parsing","server"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}