tinyhumansai/openhuman · error
team missing after creation
Error message
team missing after creation: {team_id} What it means
Internal consistency check in team_view: immediately after creating a team, re-reading it from the run ledger returned None. This should be impossible absent a ledger write/read race or persistence fault — the create path just persisted the row. It is a defensive guard converting a violated postcondition into an explicit error rather than unwrapping.
Solutions
- Check the run-ledger write path for silent failures (SQLite error swallowed, wrong workspace_dir on read)
- Look for concurrent deletion of the team between create and re-read
- If reproducible, capture ledger logs around create to see whether the row was committed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/agent/orchestration/agent_teams/ops.rs:379 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/d92333e6df8e1119.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/orchestration/agent_teams/ops.rs:379
run_ledger::shutdown_agent_team_member(&config.workspace_dir, team_id, member_id)?
.ok_or_else(|| {
anyhow!(TeamError::UnknownMember {
member_id: member_id.to_string(),
})
})?;
log::debug!(
"{LOG_PREFIX} shutdown_member.exit team={team_id} member={member_id} released={}",
released_task_ids.len()
);
Ok(MemberShutdown {
member,
released_task_ids,
})
}
fn team_view(config: &Config, team_id: &str) -> Result<TeamView> {
let team = run_ledger::get_agent_team(&config.workspace_dir, team_id)?
.ok_or_else(|| anyhow!("team missing after creation: {team_id}"))?;
let members = run_ledger::list_agent_team_members(&config.workspace_dir, team_id)?;
let tasks = run_ledger::list_agent_team_tasks(&config.workspace_dir, team_id)?;
Ok(TeamView {
team,
members,
tasks,
})
}
/// Validate a new task's dependency edges against the team's existing tasks.
///
/// 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],View on GitHub (pinned to 7491200858)