Yeachan-Heo/oh-my-codex · error · UltragoalError

formatCodexGoalReconciliation(reconciliation)

Error message

formatCodexGoalReconciliation(reconciliation)

What it means

The Codex goal snapshot reconciliation required for recording final review blockers failed (allowedStatuses ['active'], snapshot required, completion not required). The formatted reconciliation message from formatCodexGoalReconciliation describes the exact mismatch — typically the snapshot is missing, unavailable, or the Codex goal is not active.

Source

Thrown at src/ultragoal/artifacts.ts:2110

  if (!isFinalRunCompletionCandidate(plan, goal)) {
    throw new UltragoalError(`Cannot record final review blockers for ${goal.id}; it is not the only unresolved ultragoal story.`);
  }

  const now = iso(options.now);
  const expectedObjective = expectedCodexObjective(plan, goal);
  const aggregateMode = codexGoalMode(plan) === 'aggregate';
  const reconciliation = reconcileCodexGoalSnapshot(
    options.codexGoal === undefined ? null : parseCodexGoalSnapshot(options.codexGoal),
    {
      expectedObjective,
      acceptedObjectives: aggregateMode ? compatibleCodexObjectives(plan) : undefined,
      allowedStatuses: ['active'],
      requireSnapshot: true,
      requireComplete: false,
    },
  );
  if (!reconciliation.ok) {
    throw new UltragoalError(formatCodexGoalReconciliation(reconciliation));
  }

  const addedGoal = appendGoalToPlan(plan, { ...options, now: options.now, resolvesReviewBlockedGoalId: goal.id });
  goal.status = 'review_blocked';
  goal.reviewBlockedAt = now;
  goal.updatedAt = now;
  goal.completedAt = undefined;
  goal.failedAt = undefined;
  goal.failureReason = undefined;
  goal.evidence = options.evidence;
  goal.reviewBlockerResolution = {
    resolverGoalId: addedGoal.id,
    status: 'pending',
    evidence: options.evidence,
  };
  if (plan.activeGoalId === goal.id) delete plan.activeGoalId;
  plan.updatedAt = now;

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Run Codex get_goal, confirm the goal is still 'active', and pass the snapshot JSON
  2. If the goal is no longer active, record the appropriate completion/blocked checkpoint instead of review blockers
  3. Read formatCodexGoalReconciliation output embedded in the message for the precise mismatch
Defensive patterns

Strategy: validation

Validate before calling

const snap = parseCodexGoalSnapshot(options.codexGoal);
if (!snap?.available || snap.status !== 'active') { await refreshGetGoal(); }

Type guard

const isActiveSnapshot = (s: any) => Boolean(s?.available) && s?.status === 'active';

Prevention

When it happens

Trigger: Calling recordFinalReviewBlockers where reconcileCodexGoalSnapshot fails because --codex-goal-json is missing/unavailable or the Codex goal status isn't 'active'.

Common situations: Forgetting to pass a fresh get_goal snapshot; the Codex goal already completed or blocked before review blockers were recorded; get_goal errors during final review.

Related errors


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