tinyhumansai/openhuman · warning

unknown team: {team_id}

Error message

unknown team: {team_id}

What it means

Thrown by agent_teams assign_task when run_ledger::get_agent_team() returns None for the given team_id — no row in the agent_teams table of the workspace's run-ledger SQLite DB. The team id was never created, was mistyped, belongs to a different workspace_dir (the ledger is per-workspace), or the team was closed/ledger reset. The task is rejected before insertion; note the code's `let _ = team;` — only existence is checked here.

Source

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

/// Validates `depends_on`: rejects self-dependency, unknown dependency ids, and
/// dependency cycles (Kahn's algorithm over the team's existing tasks plus the
/// new one). An optional `owner_member_id` must reference a real member.
#[allow(clippy::too_many_arguments)]
pub fn assign_task(
    config: &Config,
    team_id: &str,
    title: &str,
    objective: Option<&str>,
    owner_member_id: Option<&str>,
    depends_on: &[String],
) -> Result<AgentTeamTask> {
    log::debug!(
        "{LOG_PREFIX} assign_task.entry team={team_id} deps={}",
        depends_on.len()
    );

    let team = run_ledger::get_agent_team(&config.workspace_dir, team_id)?
        .ok_or_else(|| anyhow!("unknown team: {team_id}"))?;
    let _ = team;

    let existing = run_ledger::list_agent_team_tasks(&config.workspace_dir, team_id)?;
    let task_id = format!("task-{}", Uuid::new_v4().simple());

    if let Some(owner) = owner_member_id {
        let members = run_ledger::list_agent_team_members(&config.workspace_dir, team_id)?;
        if !members.iter().any(|m| m.id == owner) {
            return Err(anyhow!(TeamError::UnknownMember {
                member_id: owner.to_string(),
            }));
        }
    }

    validate_dependencies(&task_id, depends_on, &existing)?;

    let order_index = existing.len() as i64;
    let task = run_ledger::upsert_agent_team_task(

View on GitHub (pinned to a221052e0d)

Solutions

  1. List live teams via agent_team_list and copy the id verbatim
  2. If the team should exist, confirm the core is using the same workspace_dir where it was created
  3. Recreate the team if it was closed or the ledger reset

Example fix

// before
tool: agent_team_assign_task {"team_id":"team-1234", ...} // -> unknown team: team-1234
// after
tool: agent_team_list {} // -> "team-3f9a2c..."
tool: agent_team_assign_task {"team_id":"team-3f9a2c...", ...}
Defensive patterns

Strategy: validation

Validate before calling

// Resolve the team before assigning:
let teams = tool_exec("agent_team_list", json!({})).await?; // or agent_team_get {team_id}
let id = teams.iter().find(|t| t.id == team_id).ok_or("unknown team")?.id.clone();
tool_exec("agent_team_assign_task", json!({"team_id": id, /* ... */})).await

Type guard

fn team_exists(teams: &[TeamView], team_id: &str) -> bool {
    teams.iter().any(|t| t.id == team_id)
}

Try / catch

match tool_exec("agent_team_assign_task", args).await {
    Err(e) if e.to_string().contains("unknown team") => {
        let live = tool_exec("agent_team_list", json!({})).await?; // refresh ids; recreate if closed
        Err(anyhow!("team {team_id} not in {} live teams", live.len()))
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling agent_team_assign_task with a truncated/hallucinated team id; referencing a team created in another workspace or before a workspace wipe; assigning to a team after agent_team_close; core pointed at a different workspace_dir via env override.

Common situations: LLM inventing 'team-1234' instead of using the id returned by agent_team_create; multi-workspace setups; long sessions surviving a ledger reset.

Related errors


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