{"record":{"id":"77311020abe173a1","repo":"tinyhumansai/openhuman","slug":"unknown-team-team-id","errorCode":null,"errorMessage":"unknown team: {team_id}","messagePattern":"unknown team: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/orchestration/agent_teams/ops.rs","lineNumber":140,"sourceCode":"/// Validates `depends_on`: rejects self-dependency, unknown dependency ids, and\n/// dependency cycles (Kahn's algorithm over the team's existing tasks plus the\n/// new one). An optional `owner_member_id` must reference a real member.\n#[allow(clippy::too_many_arguments)]\npub fn assign_task(\n    config: &Config,\n    team_id: &str,\n    title: &str,\n    objective: Option<&str>,\n    owner_member_id: Option<&str>,\n    depends_on: &[String],\n) -> Result<AgentTeamTask> {\n    log::debug!(\n        \"{LOG_PREFIX} assign_task.entry team={team_id} deps={}\",\n        depends_on.len()\n    );\n\n    let team = run_ledger::get_agent_team(&config.workspace_dir, team_id)?\n        .ok_or_else(|| anyhow!(\"unknown team: {team_id}\"))?;\n    let _ = team;\n\n    let existing = run_ledger::list_agent_team_tasks(&config.workspace_dir, team_id)?;\n    let task_id = format!(\"task-{}\", Uuid::new_v4().simple());\n\n    if let Some(owner) = owner_member_id {\n        let members = run_ledger::list_agent_team_members(&config.workspace_dir, team_id)?;\n        if !members.iter().any(|m| m.id == owner) {\n            return Err(anyhow!(TeamError::UnknownMember {\n                member_id: owner.to_string(),\n            }));\n        }\n    }\n\n    validate_dependencies(&task_id, depends_on, &existing)?;\n\n    let order_index = existing.len() as i64;\n    let task = run_ledger::upsert_agent_team_task(","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/orchestration/agent_teams/ops.rs#L122-L158","documentation":"assign_task looked up the team by id in the run ledger and found nothing — the team_id does not correspond to any persisted AgentTeam. The ledger lookup returns Option; this is the ok_or_else sentinel converting None into an error. Typical fault: the team was deleted, the id is from another workspace, or it is typo'd/stale in the caller (UI or orchestrator).","triggerScenarios":"Thrown at src/openhuman/agent/orchestration/agent_teams/ops.rs:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List teams from the ledger to confirm valid ids and re-issue with a correct team_id","If the team should exist, verify you are targeting the same workspace_dir the team was created in","Recreate the team if it was deleted but still needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}