Yeachan-Heo/oh-my-codex · error · Error
worker_assignment_failed:${reason}
Error message
worker_assignment_failed:${reason} What it means
Generic dispatch-failure rethrow after rollback: the post-claim dispatch failed with a reason other than 'worker_notify_failed' and the claim was released successfully. The message is 'worker_assignment_failed:' plus the underlying reason string extracted from the caught error.
Source
Thrown at src/team/runtime.ts:4814
try {
await writeWorkerInbox(
sanitized,
workerName,
`# Assignment Cancelled\n\nTask ${taskId} was not dispatched due to ${reason}.\nDo not execute this task from prior inbox content.`,
cwd,
);
} catch (err) {
process.stderr.write(`[team/runtime] operation failed: ${err}\n`);
// best effort
}
if (!released.ok) {
throw new Error(`${reason}:${released.error}`);
}
if (reason === 'worker_notify_failed') throw new Error('worker_notify_failed');
throw new Error(`worker_assignment_failed:${reason}`);
}
});
}
/**
* Reassign a task from one worker to another.
*/
export async function reassignTask(
teamName: string,
taskId: string,
_fromWorker: string,
toWorker: string,
cwd: string,
): Promise<void> {
await assignTask(teamName, toWorker, taskId, cwd);
}
function resolveCommitHygieneArtifactTeamNames(config: TeamConfig, internalTeamName: string): string[] {View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Read the suffix after 'worker_assignment_failed:' to identify the real cause and address it
- Check tmux availability/permissions and team state directory health
- Retry the assignment — the claim was cleanly released, so the task is claimable again
Example fix
// before
await assignTask(team, taskId, worker, cwd);
// after
try {
await assignTask(team, taskId, worker, cwd);
} catch (e) {
const m = /^worker_assignment_failed:(.+)$/.exec((e as Error).message);
if (m && isTransient(m[1])) { await sleep(2000); await assignTask(team, taskId, worker, cwd); }
else throw e;
} Defensive patterns
Strategy: try-catch
Try / catch
try { await assignTask(t, id, w, cwd); } catch (e) { const m = /^worker_assignment_failed:(.+)$/.exec((e as Error).message); if (m && isTransient(m[1])) { await sleep(2000); await assignTask(t, id, w, cwd); } else throw e; } Prevention
- Surface the reason suffix in logs for diagnosis
- Keep tmux and the state directory healthy
- Retry transient failures — the claim is released on rollback
When it happens
Trigger: Any exception inside the post-claim dispatch try-block (other than worker_notify_failed) — e.g. approved-execution continuity state resolution failure, tmux errors, or environment errors — after which releaseTaskClaim succeeded.
Common situations: Transient filesystem errors reading execution-continuity state; tmux binary missing or misconfigured; unexpected exceptions in dispatch plumbing surfaced as the `reason` suffix.
Related errors
- worker_notify_failed
- ${label} must not be a symlink: ${path}
- Cannot use out-of-scope artifact path; ${evidenceDescription
- Cannot advance Autopilot from ralplan to ultragoal with forg
- Refusing to overwrite existing ${repoRelative(cwd, missionPa
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/73efa4b7001bb8a4.
Report an issue: GitHub.