tinyhumansai/openhuman · error · anyhow::Error

missing value for --out

Error message

missing value for --out

What it means

Flag parsing in parse_dump_all_flags: `--out`/`-o` appeared as the last token, so args.get(i + 1) returned None and the expected directory path value is missing. The parser fails immediately with this anyhow error rather than proceeding with a partial flag state.

Solutions

  1. Supply the value: `openhuman agent dump-all --out <dir>`
  2. Check for a missing space or a trailing flag when composing the command
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/agent_cli.rs:70 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/350cf936619413b1. Report an issue: GitHub.

Appendix: source

Thrown at src/core/agent_cli.rs:70

struct DumpAllFlags {
    out: PathBuf,
    workspace: Option<PathBuf>,
    model: Option<String>,
    verbose: bool,
}

fn parse_dump_all_flags(args: &[String]) -> Result<DumpAllFlags> {
    let mut out: Option<PathBuf> = None;
    let mut workspace: Option<PathBuf> = None;
    let mut model: Option<String> = None;
    let mut verbose = false;
    let mut i = 0usize;
    while i < args.len() {
        match args[i].as_str() {
            "--out" | "-o" => {
                out = Some(PathBuf::from(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --out"))?,
                ));
                i += 2;
            }
            "--workspace" | "-w" => {
                workspace = Some(PathBuf::from(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --workspace"))?,
                ));
                i += 2;
            }
            "--model" | "-m" => {
                model = Some(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --model"))?
                        .clone(),
                );
                i += 2;
            }

View on GitHub (pinned to 7491200858)