{"record":{"id":"ff00f007189dc7f7","repo":"tinyhumansai/openhuman","slug":"method-is-required","errorCode":null,"errorMessage":"--method is required","messagePattern":"--method is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":486,"sourceCode":"                );\n                i += 2;\n            }\n            \"--params\" => {\n                params = args\n                    .get(i + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --params\"))?\n                    .clone();\n                i += 2;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman call --method <name> [--params '<json>']\");\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown call arg: {other}\")),\n        }\n    }\n\n    let method = method.ok_or_else(|| anyhow::anyhow!(\"--method is required\"))?;\n    let params = parse_json_params(&params).map_err(anyhow::Error::msg)?;\n\n    // Raw calls bypass namespace parsing, but not the configured memory-driver\n    // binding. Without this gate an absent capability could still reach a\n    // destructive embedded handler because plain CLI invocations have no\n    // ambient CoreContext to filter the registry.\n    crate::core::cli_capability::ensure_capability_blocking(\n        all::capability_for_rpc_method(&method).flatten(),\n        &format!(\"openhuman call --method {method}\"),\n    )?;\n\n    // `call` invokes a JSON-RPC method that may run an orchestrator turn\n    // (e.g. `agent.chat`), so it needs the same roomy stack as the server.\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)\n        .build()?;","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L468-L504","documentation":"The `call` argument loop finished without ever seeing `--method`. Unlike `--params` (which defaults to '{}'), the method name has no default, so `openhuman call` with no arguments, with only `--params`, or with only `-h`-less flags leaves `method: None` and this error fires. It is the last gate before capability checks and dispatch.","triggerScenarios":"`openhuman call` with no args; `openhuman call --params '{...}'` (params but no method); flags typo'd so --method was consumed as an unknown arg earlier.","commonSituations":"Assuming an interactive prompt or a default method; scripts where the method variable is empty; flag typos that silently skipped the method assignment.","solutions":["Add the method flag: `openhuman call --method <rpc-method>`","Verify the exact method name against the registry: `openhuman --help` / schema docs","Check for earlier typos — a misspelled `--method` token would have failed as 'unknown call arg' instead"],"exampleFix":"# before\nopenhuman call --params '{\"key\":1}'\n# after\nopenhuman call --method openhuman.config_get --params '{\"key\":1}'","handlingStrategy":"validation","validationCode":"# bash: hard-require the method before building the command\n[ -n \"${METHOD:-}\" ] || { echo \"usage: openhuman call --method <name> [--params '<json>']\" >&2; exit 2; }\nopenhuman call --method \"$METHOD\" ${PARAMS:+--params \"$PARAMS\"}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat --method as a required field in any `call` wrapper (it has no default)","Check that earlier flags parsed cleanly — a typo'd --method would have failed as 'unknown call arg' before reaching this","Echo the assembled command line in script debug mode before executing it"],"tags":["cli","argument-parsing","json-rpc"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}