{"record":{"id":"350cf936619413b1","repo":"tinyhumansai/openhuman","slug":"missing-value-for-out","errorCode":null,"errorMessage":"missing value for --out","messagePattern":"missing value for --out","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/agent_cli.rs","lineNumber":70,"sourceCode":"struct DumpAllFlags {\n    out: PathBuf,\n    workspace: Option<PathBuf>,\n    model: Option<String>,\n    verbose: bool,\n}\n\nfn parse_dump_all_flags(args: &[String]) -> Result<DumpAllFlags> {\n    let mut out: Option<PathBuf> = None;\n    let mut workspace: Option<PathBuf> = None;\n    let mut model: Option<String> = None;\n    let mut verbose = false;\n    let mut i = 0usize;\n    while i < args.len() {\n        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            }","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/agent_cli.rs#L52-L88","documentation":"Thrown by parse_dump_all_flags when `--out`/`-o` is the last token of `openhuman agent dump-all`, so args.get(i + 1) returns None. The flag consumes the next token as its value; there is none to consume.","triggerScenarios":"`openhuman agent dump-all --out` with nothing after it, or ending the command line with `-o`.","commonSituations":"Typing the command incrementally and forgetting the directory, or a shell script that appends `--out \"$OUT_DIR\"` with an unset variable expanding to nothing (unquoted/empty expansion leaves the flag dangling).","solutions":["Supply the output directory: `openhuman agent dump-all --out <dir>`.","In scripts, default the variable first: `OUT_DIR=\"${OUT_DIR:-./prompts}\"` so the flag always gets a value."],"exampleFix":"# before\nopenhuman agent dump-all --out\n\n# after\nopenhuman agent dump-all --out ./agent-prompts","handlingStrategy":"validation","validationCode":"// shell: ensure --out always has a value\nOUT_DIR=\"${OUT_DIR:-./agent-prompts}\"\nopenhuman agent dump-all --out \"$OUT_DIR\"","typeGuard":null,"tryCatchPattern":"match run_agent_command(&args) {\n    Err(e) if e.to_string().contains(\"missing value for --out\") => {\n        eprintln!(\"usage: openhuman agent dump-all --out <dir> [options]\");\n    }\n    other => other?,\n}","preventionTips":["Always type the value immediately after --out.","Default output-directory variables in scripts before composing the command.","Quote variables so empty expansions are visible as missing values, not silent drops."],"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"}