{"record":{"id":"65c4223b487cc455","repo":"tinyhumansai/openhuman","slug":"unknown-dump-prompt-arg-other","errorCode":null,"errorMessage":"unknown dump-prompt arg: {other}","messagePattern":"unknown dump-prompt arg: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/agent_cli.rs","lineNumber":219,"sourceCode":"                i += 2;\n            }\n            \"--json\" => {\n                out.json = true;\n                i += 1;\n            }\n            \"--with-tools\" => {\n                out.with_tools = true;\n                i += 1;\n            }\n            \"-v\" | \"--verbose\" => {\n                out.verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                print_dump_prompt_help();\n                std::process::exit(0);\n            }\n            other => return Err(anyhow!(\"unknown dump-prompt arg: {other}\")),\n        }\n        let _ = i; // silence unused-warning in the `help` branch\n    }\n    Ok(out)\n}\n\nfn run_dump_prompt(args: &[String]) -> Result<()> {\n    let flags = parse_dump_flags(args)?;\n    let agent = flags.agent.clone().ok_or_else(|| {\n        anyhow!(\"--agent <id> is required (e.g. `orchestrator`, `integrations_agent`, `welcome`)\")\n    })?;\n\n    if agent == \"integrations_agent\" && flags.toolkit.is_none() {\n        return Err(anyhow!(\n            \"--toolkit <slug> is required when --agent is `integrations_agent` \\\n             (e.g. `--toolkit gmail`). Run `composio list_connection` to see active slugs.\"\n        ));\n    }","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/agent_cli.rs#L201-L237","documentation":"Thrown by parse_dump_flags when a token of `openhuman agent dump-prompt` matches none of --agent/-a, --toolkit/-t, --workspace/-w, --model/-m, --json, --with-tools, -v/--verbose, -h/--help. The parse aborts on the first unrecognized token.","triggerScenarios":"Typo'd flags (`--agents`, `--toolkits`, `--format`), stray positional arguments, or a value-consuming flag missing its value so a later token lands in the unknown arm.","commonSituations":"Guessing flag names, using dump-all-style flags on dump-prompt, or copy-pasting from mismatched documentation/CI scripts.","solutions":["Run `openhuman agent dump-prompt --help` and use only the listed flags.","Look one token back: an unknown-arg error often means the previous flag's value was omitted.","Prefer the exact long spellings (--agent, --toolkit, --workspace, --model, --json, --with-tools)."],"exampleFix":"# before\nopenhuman agent dump-prompt --agents orchestrator\n\n# after\nopenhuman agent dump-prompt --agent orchestrator","handlingStrategy":"validation","validationCode":"const DUMP_PROMPT_FLAGS: &[&str] = &[\"--agent\", \"-a\", \"--toolkit\", \"-t\", \"--workspace\", \"-w\", \"--model\", \"-m\", \"--json\", \"--with-tools\", \"-v\", \"--verbose\", \"-h\", \"--help\"];\n// sanity-check tokens before invoking\nfor t in &args[2..] {\n    if t.starts_with('-') && !DUMP_PROMPT_FLAGS.contains(&t.as_str()) {\n        eprintln!(\"unrecognized flag {t}; see openhuman agent dump-prompt --help\");\n    }\n}","typeGuard":null,"tryCatchPattern":"match run_agent_command(&args) {\n    Err(e) if e.to_string().contains(\"unknown dump-prompt arg\") => {\n        print_dump_prompt_help();\n    }\n    other => other?,\n}","preventionTips":["Check the previous token when this fires — a missing value shifts every later token into the wrong arm.","Keep per-subcommand flag lists separate in scripts; dump-prompt and dump-all accept different sets."],"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"}