{"record":{"id":"6d9a881c708269b7","repo":"tinyhumansai/openhuman","slug":"missing-value-for-host","errorCode":null,"errorMessage":"missing value for --host","messagePattern":"missing value for --host","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":384,"sourceCode":"    let mut i = 0usize;\n\n    // Manual argument parsing loop for specific flags.\n    while i < args.len() {\n        match args[i].as_str() {\n            \"--port\" => {\n                let raw = args\n                    .get(i + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --port\"))?;\n                port = Some(\n                    raw.parse::<u16>()\n                        .map_err(|e| anyhow::anyhow!(\"invalid --port: {e}\"))?,\n                );\n                i += 2;\n            }\n            \"--host\" => {\n                host = Some(\n                    args.get(i + 1)\n                        .ok_or_else(|| anyhow::anyhow!(\"missing value for --host\"))?\n                        .clone(),\n                );\n                i += 2;\n            }\n            \"--jsonrpc-only\" => {\n                socketio_enabled = false;\n                i += 1;\n            }\n            \"--headless-api\" => {\n                socketio_enabled = false;\n                headless_api = true;\n                i += 1;\n            }\n            \"-v\" | \"--verbose\" => {\n                verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L366-L402","documentation":"`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.","triggerScenarios":"`openhuman run --host` as the final token; script conditionals appending the flag without a value.","commonSituations":"Half-edited command lines; scripts templating host/port separately with one missing; docs examples that split flag and value.","solutions":["Pass the address: `openhuman run --host 0.0.0.0` (or 127.0.0.1)","Or omit the flag to use the default 127.0.0.1 / OPENHUMAN_CORE_HOST"],"exampleFix":"# before\nopenhuman run --host\n# after\nopenhuman run --host 127.0.0.1","handlingStrategy":"validation","validationCode":"# bash: only emit --host when a value is present\nargs=(run)\n[ -n \"${HOST:-}\" ] && args+=(--host \"$HOST\")\nexec openhuman \"${args[@]}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep --host and its address in one array element pair","Use the default (127.0.0.1 / OPENHUMAN_CORE_HOST) when no override is needed","Bind 127.0.0.1 unless you genuinely need LAN exposure — undeclared listeners should stay loopback"],"tags":["cli","argument-parsing","server","network"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}