tinyhumansai/openhuman · error

file not found

Error message

file not found: {}

What it means

Existence check in the memory CLI's `read_input` helper. When the input path is not `-` (stdin), the path must exist on disk; this fires when the user passes a misspelled or not-yet-created file to an ingest/read subcommand. `path.display()` echoes the offending path.

Solutions

  1. Verify the path spelling and that the file exists (`ls <path>`).
  2. Pass `-` to read from stdin instead of a file.
  3. Use an absolute path if the working directory differs from what you expect.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/memory_cli.rs:464 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/ffbe07e9ed39d32e. Report an issue: GitHub.

Appendix: source

Thrown at src/core/memory_cli.rs:464

fn next_arg(args: &[String], i: &mut usize, flag: &str) -> Result<String> {
    let value = args
        .get(*i + 1)
        .ok_or_else(|| anyhow::anyhow!("missing value for {flag}"))?
        .clone();
    *i += 2;
    Ok(value)
}

fn read_input(path: &str) -> Result<String> {
    if path == "-" {
        let mut buf = String::new();
        std::io::stdin().read_to_string(&mut buf)?;
        Ok(buf)
    } else {
        let path = PathBuf::from(path);
        if !path.exists() {
            return Err(anyhow::anyhow!("file not found: {}", path.display()));
        }
        Ok(std::fs::read_to_string(&path)?)
    }
}

/// Resolve the memory client for a subcommand, refusing first when the bound
/// driver cannot serve it.
///
/// Two gates run here, both *config facts* naming the driver rather than silent
/// absence (`docs/specs/kernel.md` §3.3 makes the CLI its one exception, because
/// a human reads silence as a typo — same reasoning as the retained `mcp` /
/// `tui` arms in `src/core/cli.rs`):
///
/// 1. **Capability gate** — when the subcommand maps to a gated controller, the
///    bound driver must advertise that family.
/// 2. **Legacy-client gate** — every subcommand below operates on the embedded
///    store directly (via `memory::global::init`), so the bound driver must be
///    the embedded engine. This is what makes `driver = "null"` (or a fallback)

View on GitHub (pinned to 7491200858)