tinyhumansai/openhuman · error

Unsupported runtime kind

Error message

Unsupported runtime kind: {other}

What it means

create_runtime maps the configured runtime kind string to an adapter, and only "native" and "docker" exist; any other value bails with 'Unsupported runtime kind: {other}'. The value comes straight from the runtime config, so this is a config-validation failure surfacing at adapter construction time - a typo, a stale key from an older config, or a kind this build predates.

Solutions

  1. Set the runtime kind to `native` or `docker` in the config.
  2. If you expected a newer kind, upgrade the core binary to a version that supports it.
  3. Validate kind against the known set at config load so failures surface earlier with a clearer message.

Example fix

# before
[runtime]
kind = "podman"

# after
[runtime]
kind = "docker"
Defensive patterns

Strategy: validation

Validate before calling

const KNOWN_RUNTIME_KINDS: &[&str] = &["native", "docker"];
if !KNOWN_RUNTIME_KINDS.contains(&config.kind.as_str()) {
    anyhow::bail!("runtime kind must be one of {KNOWN_RUNTIME_KINDS:?}, got {}", config.kind);
}

Prevention

When it happens

Trigger: The runtime config's kind is set to something like 'local', 'sandbox', or 'podman', or misspells 'docker'; the config was written for a newer core version that added a kind this binary does not know.

Common situations: Hand-edited config TOML; a migration leaving a legacy value behind; version skew between the config producer and the running core.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/openhuman/agent/host_runtime.rs:207

        // No `pipefail` wrapper here (unlike NativeRuntime): the in-container
        // shell is image-dependent (busybox/dash/bash) so we can't assume
        // `set -o pipefail` is supported. Container commands keep POSIX `sh`.
        cmd.arg("sh").arg("-lc").arg(command);
        Ok(cmd)
    }
}

/// Build the runtime adapter for the configured `kind`. `hide_window` comes
/// from `[shell] hide_window` and only affects the native runtime on Windows
/// (the docker runtime spawns the `docker` client, out of scope here).
pub fn create_runtime(
    config: &RuntimeConfig,
    hide_window: bool,
) -> anyhow::Result<Box<dyn RuntimeAdapter>> {
    match config.kind.as_str() {
        "native" => Ok(Box::new(NativeRuntime::with_hide_window(hide_window))),
        "docker" => Ok(Box::new(DockerRuntime::new(config.docker.clone()))),
        other => anyhow::bail!("Unsupported runtime kind: {other}"),
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::openhuman::config::{DockerRuntimeConfig, RuntimeConfig};

    #[test]
    fn native_runtime_reports_capabilities_and_shell_command() {
        let runtime = NativeRuntime::new();
        assert_eq!(runtime.name(), "native");
        assert!(runtime.has_shell_access());
        assert!(runtime.has_filesystem_access());
        assert!(runtime.supports_long_running());
        assert_eq!(runtime.memory_budget(), 0);
        assert!(runtime.storage_path().ends_with("openhuman/runtime"));

View on GitHub (pinned to 7491200858)