{"record":{"id":"ac43a7c129b6da9d","repo":"tinyhumansai/openhuman","slug":"unknown-dump-all-arg-other","errorCode":null,"errorMessage":"unknown dump-all arg: {other}","messagePattern":"unknown dump-all arg: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/agent_cli.rs","lineNumber":101,"sourceCode":"                    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        }\n    }\n    Ok(DumpAllFlags {\n        out: out.ok_or_else(|| anyhow!(\"--out <dir> is required\"))?,\n        workspace,\n        model,\n        verbose,\n    })\n}\n\nfn run_dump_all(args: &[String]) -> Result<()> {\n    let flags = parse_dump_all_flags(args)?;\n    init_quiet_logging(flags.verbose);\n\n    log::debug!(\n        \"[agent-cli] run_dump_all entry: out={} workspace={:?} model={:?}\",\n        flags.out.display(),\n        flags.workspace,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/agent_cli.rs#L83-L119","documentation":"Thrown by parse_dump_all_flags when a token of `openhuman agent dump-all` matches none of --out/-o, --workspace/-w, --model/-m, -v/--verbose, -h/--help. Any unrecognized argument aborts the parse, and the value forms do not validate that the next token is not itself a flag.","triggerScenarios":"Typo'd or unsupported flags such as `--output`, `--dir`, `--format json`; positional extras; or a value-consuming flag whose value is missing so the following flag token is swallowed as a value and the token after it becomes 'unknown'.","commonSituations":"Guessing flag names from other CLIs (docker-style `--output`), copy-pasting a command from older/newer docs, or `--out --model foo` where '--model' is silently taken as the out path and 'foo' then errors as unknown.","solutions":["Run `openhuman agent dump-all --help` and use only --out/-o, --workspace/-w, --model/-m, -v.","Check for a missing value before an unknown-arg error: `--out` immediately followed by another `--flag` means the value was forgotten.","Prefer the long forms exactly as spelled (hyphenated, e.g. --workspace not --work-space)."],"exampleFix":"# before\nopenhuman agent dump-all --output ./p\n\n# after\nopenhuman agent dump-all --out ./p","handlingStrategy":"validation","validationCode":"const DUMP_ALL_FLAGS: &[&str] = &[\"--out\", \"-o\", \"--workspace\", \"-w\", \"--model\", \"-m\", \"-v\", \"--verbose\", \"-h\", \"--help\"];\nfn flags_known(args: &[String]) -> bool {\n    args.iter().step_by(2).all(|a| DUMP_ALL_FLAGS.contains(&a.as_str()) || !a.starts_with('-'))\n}","typeGuard":null,"tryCatchPattern":"match run_agent_command(&args) {\n    Err(e) if e.to_string().contains(\"unknown dump-all arg\") => {\n        eprintln!(\"run `openhuman agent dump-all --help` for accepted flags\");\n    }\n    other => other?,\n}","preventionTips":["Check `--help` output before using a flag you are unsure about.","Watch for missing values: `--out --model x` silently mis-parses and then errors as unknown-arg.","Copy flag names verbatim from the current build's help, not from memory."],"tags":["rust","cli","argument-parsing","unknown-flag"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}