tinyhumansai/openhuman · error · anyhow::Error

missing required string argument `workflow_id`

Error message

missing required string argument `workflow_id`

What it means

The workflow-id reader found neither `workflow_id` nor the legacy `skill_id` alias in the tool arguments. This dedicated helper exists for rename back-compat, so this fires only when both keys are missing/empty — the caller used neither the current nor the pre-rename name for the workflow reference.

Source

Thrown at src/openhuman/skills/tools.rs:53

use super::ops_types::WorkflowScope;
use super::registry::get_workflow_with_profile;
use super::run_log::{read_run_log_slice, scan_runs};

fn read_required_str(args: &serde_json::Value, key: &str) -> anyhow::Result<String> {
    args.get(key)
        .and_then(serde_json::Value::as_str)
        .map(str::trim)
        .filter(|s| !s.is_empty())
        .map(str::to_string)
        .ok_or_else(|| anyhow::anyhow!("missing required string argument `{key}`"))
}

/// Read the target workflow id, accepting the legacy `skill_id` key as an
/// alias for `workflow_id` so callers from before the rename still work.
fn read_workflow_id(args: &serde_json::Value) -> anyhow::Result<String> {
    read_required_str(args, "workflow_id")
        .or_else(|_| read_required_str(args, "skill_id"))
        .map_err(|_| anyhow::anyhow!("missing required string argument `workflow_id`"))
}

/// Skill/workflow allowlist applied per agent profile. `None` = all skills are
/// visible (the default). `Some(set)` restricts to the named `dir_name` slugs.
type SkillAllowlist = Option<std::collections::HashSet<String>>;

/// Whether `dir_name` passes the optional per-profile skill allowlist.
fn skill_allowed(allowlist: &SkillAllowlist, dir_name: &str) -> bool {
    match allowlist {
        None => true,
        Some(set) => set.contains(dir_name),
    }
}

/// Whether `skill_id` is usable given the profile's allowlist AND its private
/// skills. A profile's own (profile-local) skills are implicitly allowed for
/// their owner — they bypass the `allowed_skills` allowlist, mirroring
/// `list_workflows`. `profile_local_ids` is empty for the profile-less session

View on GitHub (pinned to 7491200858)

Solutions

  1. Pass `workflow_id` (or legacy `skill_id`) as a non-empty string
  2. Copy the id from the workflow listing output
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/skills/tools.rs:53 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/8f6e89cd52d1bea1. Report an issue: GitHub.