tinyhumansai/openhuman · error

unknown function '{namespace} {function}'. Run `openhuman {n

Error message

unknown function '{namespace} {function}'. Run `openhuman {namespace} --help`.

What it means

The namespace resolved against the registry, but no controller schema in it matches the function name. As with namespaces, the CLI consults the UNFILTERED registry (no ambient context), so a function compiled out by a cargo gate is genuinely absent — e.g. `memory_diff` when the `memory-git` feature is off, while the `memory` namespace itself remains. The capability gate deliberately distinguishes a real typo (falls through to this message) from a gated function, to keep typos diagnosable per docs/specs/kernel.md §3.3.

Source

Thrown at src/core/cli.rs:583

    // *nothing* is filtered, a gated function is still found here, and a check
    // placed only in the not-found arm would never execute — the command would
    // simply run. Gating the resolved function instead makes this fire on the
    // path users actually take, and it stays correct under `run`/`serve` where
    // `grouped` genuinely is filtered.
    //
    // `capability_for_parts` consults the UNFILTERED registry and yields `None`
    // for a function registered nowhere, so a genuine typo short-circuits the
    // gate and falls through to the unknown-function message below. Keeping the
    // two distinguishable is the point: collapsing them would make real typos
    // harder to diagnose, which is the failure `docs/specs/kernel.md` §3.3
    // carves the CLI out of.
    crate::core::cli_capability::ensure_capability_blocking(
        all::capability_for_parts(namespace, function).flatten(),
        &format!("openhuman {namespace} {function}"),
    )?;

    let Some(schema) = schemas.iter().find(|s| s.function == function).cloned() else {
        return Err(anyhow::anyhow!(
            "unknown function '{namespace} {function}'. Run `openhuman {namespace} --help`."
        ));
    };

    if args.len() > 1 && is_help(&args[1]) {
        print_function_help(namespace, &schema);
        return Ok(());
    }

    // Generic parameter parsing and validation based on schema.
    let params = parse_function_params(&schema, &args[1..]).map_err(anyhow::Error::msg)?;
    let method = all::rpc_method_from_parts(namespace, function)
        .ok_or_else(|| anyhow::anyhow!("unregistered controller '{namespace}.{function}'"))?;

    // Same as the explicit `call` path above — any registered controller may
    // ultimately drive an orchestrator turn.
    let rt = tokio::runtime::Builder::new_multi_thread()
        .enable_all()

View on GitHub (pinned to a221052e0d)

Solutions

  1. List the namespace's real functions: `openhuman <namespace> --help`
  2. Fix the function-name typo
  3. If the function sits behind a cargo feature (e.g. memory-git for memory_diff), rebuild with that feature

Example fix

# before
openhuman memory seach --query 'foo'
# after
openhuman memory search --query 'foo'
Defensive patterns

Strategy: validation

Validate before calling

# bash: verify the function exists in this namespace before invoking
openhuman "$NS" --help 2>/dev/null | grep -qw "$FN" \
  || { echo "unknown function '$NS $FN' — see 'openhuman $NS --help'" >&2; exit 2; }
openhuman "$NS" "$FN" "$@"

Try / catch

out=$(openhuman "$ns" "$fn" "${@}" 2>&1) || { case "$out" in *"unknown function"*) echo "typo or feature-gated function: $ns $fn" >&2;; *) printf '%s\n' "$out" >&2;; esac; exit 1; }

Prevention

When it happens

Trigger: `openhuman memory seach` (typo); `openhuman memory memory_diff ...` on a build without `memory-git`; calling a function renamed or removed in this version; wrong namespace for a function that lives elsewhere.

Common situations: Autocomplete/manual recall errors; feature-gated functions on slim builds; version drift where a function was renamed; scripts targeting a fuller build.

Related errors


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