Yeachan-Heo/oh-my-codex · warning · Error
blocked_dependency:${(claim.dependencies ?? []).join(',')}
Error message
blocked_dependency:${(claim.dependencies ?? []).join(',')} What it means
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.
Source
Thrown at src/team/runtime.ts:4712
throw new Error('delegation_only_violation');
}
if (governance.plan_approval_required && task.requires_code_change === true) {
const approved = await isTaskApprovedForExecution(sanitized, taskId, cwd);
if (!approved) {
throw new Error('plan_approval_required');
}
}
const config = await readTeamConfig(sanitized, cwd);
if (!config) throw new Error(`Team ${sanitized} not found`);
const workerInfo = config.workers.find(w => w.name === workerName);
if (!workerInfo) throw new Error(`Worker ${workerName} not found in team`);
const dispatchPolicy = resolveDispatchPolicy(manifest?.policy, config.worker_launch_mode);
const claim = await claimTask(sanitized, taskId, workerName, task.version ?? 1, cwd);
if (!claim.ok) {
if (claim.error === 'blocked_dependency') {
throw new Error(`blocked_dependency:${(claim.dependencies ?? []).join(',')}`);
}
throw new Error(claim.error);
}
try {
// Retry dispatch up to 2 times to handle trust prompts during assignment (fixes #393).
const approvedExecutionState = await resolvePersistedApprovedTeamExecutionContinuityState(
sanitized,
config.leader_cwd ?? cwd,
config.team_state_root ?? resolveCanonicalTeamStateRoot(config.leader_cwd ?? cwd),
);
const persistedUltragoalContext = await readPersistedTeamUltragoalContext(
sanitized,
config.leader_cwd ?? cwd,
config.team_state_root ?? resolveCanonicalTeamStateRoot(config.leader_cwd ?? cwd),
);
const approvedContextSection = joinContextSections(
approvedExecutionState.status === 'valid'View on GitHub (pinned to 3ad79a8a6f)
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
Example fix
// before await assignTask(team, 'T-10', worker, cwd); // after // ensure T-8 and T-9 are done first for (const dep of ['T-8', 'T-9']) await waitForTaskDone(team, dep, cwd); await assignTask(team, 'T-10', worker, cwd);
Defensive patterns
Strategy: retry
Validate before calling
const task = await readTask(teamName, taskId, cwd);
const incomplete = (task.dependencies ?? []).filter(d => !isDone(await readTask(teamName, d, cwd)));
if (incomplete.length) throw new Error(`blocked by ${incomplete}`); Try / catch
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; } Prevention
- Dispatch tasks in topological order
- Watch dependency task statuses before dispatching dependents
- Handle permanently-failed dependencies explicitly
When it happens
Trigger: Assigning a task whose dependency tasks are still pending/blocked/failed; the message encodes claim.dependencies joined by ','.
Common situations: 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.
Related errors
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/c758726452144806.
Report an issue: GitHub.