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

Cannot record final review blockers for ${goal.id}; it is no

Error message

Cannot record final review blockers for ${goal.id}; it is not the only unresolved ultragoal story.

What it means

recordFinalReviewBlockers only applies to the final unresolved ultragoal story — isFinalRunCompletionCandidate(plan, goal) returned false, meaning other unresolved goals exist or this goal is not positioned as the final story.

Source

Thrown at src/ultragoal/artifacts.ts:2093

      qualityGate,
      message: 'Aggregate ultragoal plan completed with a clean final quality gate.',
    });
  }
  return plan;
  });
}

export async function recordFinalReviewBlockers(cwd: string, options: RecordFinalReviewBlockersOptions): Promise<{ plan: UltragoalPlan; blockedGoal: UltragoalItem; addedGoal: UltragoalItem }> {
  return withUltragoalMutationLock(cwd, async () => {
  const plan = await readUltragoalPlanUnderLock(cwd);
  const goal = plan.goals.find((candidate) => candidate.id === options.goalId);
  if (!goal) throw new UltragoalError(`Unknown ultragoal id: ${options.goalId}`);
  assertNonEmpty(options.evidence, '--evidence');
  if (goal.status !== 'in_progress') {
    throw new UltragoalError(`Cannot record final review blockers for ${goal.id} while it is ${goal.status}; start or resume the ultragoal first.`);
  }
  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));
  }

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Resolve or complete the other outstanding goals first so the target becomes the only unresolved story
  2. If multiple goals need review blockers, complete the earlier ones before final review
  3. Verify plan ordering and goal statuses before invoking the final-review flow
Defensive patterns

Strategy: validation

Validate before calling

if (!isFinalRunCompletionCandidate(plan, goal)) { throw new Error('other unresolved goals remain — finish them first'); }

Prevention

When it happens

Trigger: Calling recordFinalReviewBlockers when other goals are still unresolved (not complete/terminal), so the target isn't the sole remaining story.

Common situations: Recording blockers mid-plan while sibling goals are still open; trying to block a non-final goal; plan ordering changed after creation.

Related errors


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