{"record":{"id":"0d77165473c5ae43","repo":"tinyhumansai/openhuman","slug":"missing-value-for-model","errorCode":null,"errorMessage":"missing value for --model","messagePattern":"missing value for --model","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/agent_cli.rs","lineNumber":84,"sourceCode":"        match args[i].as_str() {\n            \"--out\" | \"-o\" => {\n                out = Some(PathBuf::from(\n                    args.get(i + 1)\n                        .ok_or_else(|| anyhow!(\"missing value for --out\"))?,\n                ));\n                i += 2;\n            }\n            \"--workspace\" | \"-w\" => {\n                workspace = Some(PathBuf::from(\n                    args.get(i + 1)\n                        .ok_or_else(|| anyhow!(\"missing value for --workspace\"))?,\n                ));\n                i += 2;\n            }\n            \"--model\" | \"-m\" => {\n                model = Some(\n                    args.get(i + 1)\n                        .ok_or_else(|| anyhow!(\"missing value for --model\"))?\n                        .clone(),\n                );\n                i += 2;\n            }\n            \"-v\" | \"--verbose\" => {\n                verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman agent dump-all --out <dir> [--workspace <path>] [--model <name>] [-v]\");\n                println!();\n                println!(\"Render every registered agent's turn-1 system prompt into <dir>.\");\n                println!(\"`integrations_agent` is expanded into one file per currently-connected\");\n                println!(\"Composio toolkit; if no toolkit is connected, it is skipped.\");\n                std::process::exit(0);\n            }\n            other => return Err(anyhow!(\"unknown dump-all arg: {other}\")),\n        }","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/agent_cli.rs#L66-L102","documentation":"Thrown by parse_dump_all_flags when `--model`/`-m` is the last token of `openhuman agent dump-all`, so no value token follows to read as the model name.","triggerScenarios":"`openhuman agent dump-all --out d --model` as the end of the command line.","commonSituations":"Appending an optional model override from an empty shell variable, or pausing mid-command and submitting early.","solutions":["Drop the trailing `--model` (model is optional) or provide a model id, e.g. `--model claude-sonnet-4`.","Quote and default model variables in wrappers so the flag never dangles."],"exampleFix":"# before\nopenhuman agent dump-all --out ./p --model\n\n# after\nopenhuman agent dump-all --out ./p --model gpt-5","handlingStrategy":"validation","validationCode":"# append --model only when provided\nCMD=(openhuman agent dump-all --out \"$OUT_DIR\")\n[ -n \"${MODEL:-}\" ] && CMD+=(--model \"$MODEL\")\n\"${CMD[@]}\"","typeGuard":null,"tryCatchPattern":"match run_agent_command(&args) {\n    Err(e) if e.to_string().contains(\"missing value for --model\") => {\n        eprintln!(\"--model needs a model id after it (or omit the flag)\");\n    }\n    other => other?,\n}","preventionTips":["Model is optional for dump-all; omit the flag unless overriding the configured default.","Never let an empty shell variable sit right after a value-consuming flag."],"tags":["rust","cli","argument-parsing","missing-value"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}