tinyhumansai/openhuman · warning

--out <dir> is required

Error message

--out <dir> is required

What it means

Thrown at the end of parse_dump_all_flags when the loop finished without ever setting --out. Unlike the optional workspace/model flags, the output directory is mandatory for `openhuman agent dump-all`, and the Option is unwrapped with this explicit error.

Source

Thrown at src/core/agent_cli.rs:105

                i += 2;
            }
            "-v" | "--verbose" => {
                verbose = true;
                i += 1;
            }
            "-h" | "--help" => {
                println!("Usage: openhuman agent dump-all --out <dir> [--workspace <path>] [--model <name>] [-v]");
                println!();
                println!("Render every registered agent's turn-1 system prompt into <dir>.");
                println!("`integrations_agent` is expanded into one file per currently-connected");
                println!("Composio toolkit; if no toolkit is connected, it is skipped.");
                std::process::exit(0);
            }
            other => return Err(anyhow!("unknown dump-all arg: {other}")),
        }
    }
    Ok(DumpAllFlags {
        out: out.ok_or_else(|| anyhow!("--out <dir> is required"))?,
        workspace,
        model,
        verbose,
    })
}

fn run_dump_all(args: &[String]) -> Result<()> {
    let flags = parse_dump_all_flags(args)?;
    init_quiet_logging(flags.verbose);

    log::debug!(
        "[agent-cli] run_dump_all entry: out={} workspace={:?} model={:?}",
        flags.out.display(),
        flags.workspace,
        flags.model
    );

    let rt = tokio::runtime::Builder::new_multi_thread()

View on GitHub (pinned to a221052e0d)

Solutions

  1. Add `--out <dir>` (or `-o <dir>`) — the directory every registered agent's turn-1 system prompt is rendered into.
  2. If you wanted stdout output for a single agent, use `openhuman agent dump-prompt --agent <id>` instead.

Example fix

# before
openhuman agent dump-all -v

# after
openhuman agent dump-all --out ./agent-prompts -v
Defensive patterns

Strategy: validation

Validate before calling

# shell: fail early if OUT_DIR unset
: "${OUT_DIR:?OUT_DIR must be set (output directory for prompt dump)}"
openhuman agent dump-all --out "$OUT_DIR"

Try / catch

match run_agent_command(&args) {
    Err(e) if e.to_string().contains("--out <dir> is required") => {
        eprintln!("dump-all renders files, so an output directory is mandatory");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Running `openhuman agent dump-all` with only optional flags (`-v`, `--model x`, `--workspace w`) or with no arguments at all.

Common situations: Assuming dump-all prints to stdout like dump-prompt can, or a script stripping the --out pair on a condition that never fired.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/6faa6bc8653a13c1. Report an issue: GitHub.