{"record":{"id":"c758726452144806","repo":"Yeachan-Heo/oh-my-codex","slug":"blocked-dependency-claim-dependencies-jo","errorCode":null,"errorMessage":"blocked_dependency:${(claim.dependencies ?? []).join(',')}","messagePattern":"blocked_dependency:(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"src/team/runtime.ts","lineNumber":4712,"sourceCode":"    throw new Error('delegation_only_violation');\n  }\n\n  if (governance.plan_approval_required && task.requires_code_change === true) {\n    const approved = await isTaskApprovedForExecution(sanitized, taskId, cwd);\n    if (!approved) {\n      throw new Error('plan_approval_required');\n    }\n  }\n  const config = await readTeamConfig(sanitized, cwd);\n  if (!config) throw new Error(`Team ${sanitized} not found`);\n  const workerInfo = config.workers.find(w => w.name === workerName);\n  if (!workerInfo) throw new Error(`Worker ${workerName} not found in team`);\n  const dispatchPolicy = resolveDispatchPolicy(manifest?.policy, config.worker_launch_mode);\n\n  const claim = await claimTask(sanitized, taskId, workerName, task.version ?? 1, cwd);\n  if (!claim.ok) {\n    if (claim.error === 'blocked_dependency') {\n      throw new Error(`blocked_dependency:${(claim.dependencies ?? []).join(',')}`);\n    }\n    throw new Error(claim.error);\n  }\n\n  try {\n    // Retry dispatch up to 2 times to handle trust prompts during assignment (fixes #393).\n    const approvedExecutionState = await resolvePersistedApprovedTeamExecutionContinuityState(\n      sanitized,\n      config.leader_cwd ?? cwd,\n      config.team_state_root ?? resolveCanonicalTeamStateRoot(config.leader_cwd ?? cwd),\n    );\n    const persistedUltragoalContext = await readPersistedTeamUltragoalContext(\n      sanitized,\n      config.leader_cwd ?? cwd,\n      config.team_state_root ?? resolveCanonicalTeamStateRoot(config.leader_cwd ?? cwd),\n    );\n    const approvedContextSection = joinContextSections(\n      approvedExecutionState.status === 'valid'","sourceCodeStart":4694,"sourceCodeEnd":4730,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/runtime.ts#L4694-L4730","documentation":"Thrown when claimTask fails with error 'blocked_dependency'; the message lists the comma-separated task IDs of unresolved dependencies. A task cannot be claimed until its dependencies complete.","triggerScenarios":"Assigning a task whose dependency tasks are still pending/blocked/failed; the message encodes claim.dependencies joined by ','.","commonSituations":"Parallel dispatch of a task graph without respecting dependency order; a dependency failed earlier so dependents stay blocked forever; dependency IDs pointing at deleted tasks.","solutions":["Complete (or skip/cancel) the listed dependency tasks first, then retry assignment","If a dependency failed, address its failure or explicitly mark it skipped per the team workflow","For independent tasks, remove the incorrect dependency edges from the task definition"],"exampleFix":"// before\nawait assignTask(team, 'T-10', worker, cwd);\n\n// after\n// ensure T-8 and T-9 are done first\nfor (const dep of ['T-8', 'T-9']) await waitForTaskDone(team, dep, cwd);\nawait assignTask(team, 'T-10', worker, cwd);","handlingStrategy":"retry","validationCode":"const task = await readTask(teamName, taskId, cwd);\nconst incomplete = (task.dependencies ?? []).filter(d => !isDone(await readTask(teamName, d, cwd)));\nif (incomplete.length) throw new Error(`blocked by ${incomplete}`);","typeGuard":null,"tryCatchPattern":"try { await assignTask(t, id, w, cwd); } catch (e) { const m = /^blocked_dependency:(.*)$/.exec((e as Error).message); if (m) { await waitForDeps(t, m[1].split(',')); await assignTask(t, id, w, cwd); } else throw e; }","preventionTips":["Dispatch tasks in topological order","Watch dependency task statuses before dispatching dependents","Handle permanently-failed dependencies explicitly"],"tags":["task","dependencies","dag"],"backgroundTag":"unmet-dependency","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}