tinyhumansai/openhuman · error

missing value for --workspace

Error message

missing value for --workspace

What it means

Value-presence guard in `parse_tick_flags` for the `subconscious tick` subcommand. When --workspace/-w is given as the final token, args.get(i+1) is None and the parser fails rather than silently leaving workspace unset. It reports a truncated flag, not a bad path.

Solutions

  1. Supply the path directly after the flag: `--workspace /path/to/ws` (short form -w).
  2. Omit --workspace entirely to use the configured workspace_dir.
  3. Quote paths containing spaces.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/subconscious_cli.rs:43 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/7c2668f112703951. Report an issue: GitHub.

Appendix: source

Thrown at src/core/subconscious_cli.rs:43

// ── tick ────────────────────────────────────────────────────────────────────

struct TickFlags {
    workspace: Option<PathBuf>,
    mode: Option<String>,
    verbose: bool,
}

fn parse_tick_flags(args: &[String]) -> Result<TickFlags> {
    let mut workspace: Option<PathBuf> = None;
    let mut mode: Option<String> = None;
    let mut verbose = false;
    let mut i = 0;
    while i < args.len() {
        match args[i].as_str() {
            "--workspace" | "-w" => {
                workspace = Some(PathBuf::from(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --workspace"))?,
                ));
                i += 2;
            }
            "--mode" | "-m" => {
                mode = Some(
                    args.get(i + 1)
                        .ok_or_else(|| anyhow!("missing value for --mode"))?
                        .clone(),
                );
                i += 2;
            }
            "--verbose" | "-v" => {
                verbose = true;
                i += 1;
            }
            other => return Err(anyhow!("unknown flag '{other}'")),
        }
    }

View on GitHub (pinned to 7491200858)