Yeachan-Heo/oh-my-codex · critical · Error

${reason}:${released.error}

Error message

${reason}:${released.error}

What it means

Composite error from the claim-rollback path: after a dispatch failure the runtime tried to release the claim (releaseTaskClaim) and that release itself failed. The message is `${reason}:${released.error}` — the original failure reason plus the release failure detail.

Source

Thrown at src/team/runtime.ts:4810

    const reason = error instanceof Error && error.message.trim() !== ''
      ? error.message
      : 'worker_assignment_failed';

    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> {

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Inspect both halves of the message: fix the original dispatch reason, then reconcile the stale claim (re-read task state; force-release if a tool is available)
  2. Check whether a watchdog/supervisor already released the claim — the task may simply need re-assignment
  3. If task state files are corrupted, restore from backup or reinitialize the task

Example fix

// before
// no handling; intermittent `${reason}:${released.error}` failures

// after
try {
  await assignTask(team, taskId, worker, cwd);
} catch (e) {
  if (/^.+:.+$/.test(String((e as Error).message)) && await isClaimStuck(team, taskId)) {
    await forceReleaseClaim(team, taskId);
  }
  throw e;
}
Defensive patterns

Strategy: fallback

Try / catch

try { await assignTask(t, id, w, cwd); } catch (e) { const m = /^(.+):(.+)$/.exec((e as Error).message); if (m && await isClaimStuck(t, id)) await forceReleaseClaim(t, id); throw e; }

Prevention

When it happens

Trigger: Any post-claim dispatch error (catch block) where the compensating releaseTaskClaim call returns ok:false, e.g. claim token no longer recognized or task state changed underneath the rollback.

Common situations: Claim token expired or was already released by a watchdog; concurrent supervisor also trying to release the same claim; filesystem/state corruption in the task store making the release fail.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/32c6d4d8b28d6d17. Report an issue: GitHub.