tinyhumansai/openhuman · error · TeamError

unknown dependency

Error message

unknown dependency: {depends_on}

What it means

validate_dependencies found a depends_on entry that matches no existing task id in the team (TeamError::UnknownDependency). The known set is built from the team's current tasks; the faulting input is the unrecognized dependency id — typo'd, deleted, or belonging to another team.

Solutions

  1. List the team's tasks and correct the dependency id
  2. Create the missing task first if it was never added
  3. Remove dangling references to deleted tasks from depends_on
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/agent/orchestration/agent_teams/ops.rs:409 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/010ae920dc908430. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/orchestration/agent_teams/ops.rs:409

/// Rejects self-dependency, unknown dependency ids, and any edge that would
/// introduce a cycle. The cycle check builds the full graph (existing tasks +
/// the new task with its proposed deps) and runs Kahn's algorithm — the same
/// shape used for workflow phase graphs in `workflow_runs::ops::has_cycle`.
fn validate_dependencies(
    new_task_id: &str,
    depends_on: &[String],
    existing: &[AgentTeamTask],
) -> Result<()> {
    let known: HashSet<&str> = existing.iter().map(|t| t.id.as_str()).collect();

    for dep in depends_on {
        if dep == new_task_id {
            return Err(anyhow!(TeamError::SelfDependency {
                task_id: new_task_id.to_string(),
            }));
        }
        if !known.contains(dep.as_str()) {
            return Err(anyhow!(TeamError::UnknownDependency {
                depends_on: dep.clone(),
            }));
        }
    }

    if has_task_cycle(new_task_id, depends_on, existing) {
        return Err(anyhow!(TeamError::CyclicDependency));
    }

    Ok(())
}

/// Kahn's-algorithm cycle check over the task dependency graph (existing tasks
/// plus the candidate new task). Edge `dep -> task` means `task` depends on
/// `dep`. Edges pointing at unknown ids are ignored here (rejected separately).
fn has_task_cycle(
    new_task_id: &str,
    new_depends_on: &[String],

View on GitHub (pinned to 7491200858)