Yeachan-Heo/oh-my-codex · error · UltragoalError
Blocked ultragoal checkpoint objective mismatch: expected on
Error message
Blocked ultragoal checkpoint objective mismatch: expected one of [${[expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)].join(' | ')}], got ${snapshot.objective}. Matching native blocked checkpoints require the expected/compatible Codex objective; finish or clear the foreign goal, or pass a matching blocked get_goal snapshot with --evidence. What it means
The blocked get_goal snapshot's objective does not match the plan's expected Codex objective or any compatible objective. A 'blocked' snapshot status only permits a native blocked checkpoint when it matches this goal; foreign goals must be finished or cleared first.
Source
Thrown at src/ultragoal/artifacts.ts:1826
status: goal.status,
evidence: options.evidence,
codexGoal: options.codexGoal,
message: 'Codex get_goal was unavailable due to a DB/schema/context error; strict completion reconciliation is deferred until get_goal works.',
});
return plan;
}
if (!snapshot?.available) {
throw new UltragoalError('Blocked ultragoal checkpoints require either a get_goal snapshot for the completed legacy Codex goal that blocked create_goal, an unavailable get_goal error JSON for a Codex DB/schema/context failure, or a matching native blocked snapshot; pass --codex-goal-json.');
}
if (!snapshot.objective) {
throw new UltragoalError('Blocked ultragoal checkpoint Codex snapshot is missing objective text.');
}
const blockedSnapshotMatchesExpected = [expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)]
.some((objective) => normalizeObjective(objective) === normalizeObjective(snapshot.objective ?? ''));
if (snapshot.status === 'blocked') {
if (!blockedSnapshotMatchesExpected) {
throw new UltragoalError(
`Blocked ultragoal checkpoint objective mismatch: expected one of [${[expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)].join(' | ')}], got ${snapshot.objective}. Matching native blocked checkpoints require the expected/compatible Codex objective; finish or clear the foreign goal, or pass a matching blocked get_goal snapshot with --evidence.`,
);
}
const evidence = assertNonEmpty(options.evidence, '--evidence');
goal.updatedAt = now;
plan.activeGoalId = goal.id;
plan.updatedAt = now;
await writePlan(cwd, plan);
await appendLedger(cwd, {
ts: now,
event: 'goal_blocked',
goalId: goal.id,
status: goal.status,
evidence,
codexGoal: options.codexGoal,
message: 'Native Codex goal status is blocked for the matching objective; recorded a non-terminal goal_blocked checkpoint. Continue work without treating this as complete or failed; re-check get_goal when the blocker clears.',
});
return plan;
}View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Finish or clear the foreign Codex goal in Codex, then retry
- Pass a get_goal snapshot for the goal whose objective matches the plan (check compatible objectives in the error message)
- Align the plan's expected objective text with the actual Codex goal objective if they describe the same work
Defensive patterns
Strategy: validation
Validate before calling
const allowed = [expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)].map(normalizeObjective);
if (!allowed.includes(normalizeObjective(snap.objective ?? ''))) { /* finish/clear foreign goal first */ } Type guard
const objectiveMatches = (snap: any, plan: any, goal: any) =>
[expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)]
.some(o => normalizeObjective(o) === normalizeObjective(snap.objective ?? '')); Prevention
- Keep plan objective text and Codex goal objective in sync
- Clean up leftover Codex goals before starting new ultragoals
When it happens
Trigger: Passing a blocked snapshot whose normalized objective differs from normalizeObjective(expectedCodexObjective(plan, goal)) and all compatibleCodexObjectives(plan) — i.e. the blocked Codex goal belongs to different work.
Common situations: Leftover Codex goals from previous tasks blocking create_goal; multiple concurrent objectives in one Codex workspace; objective text drift between plan and Codex goal.
Related errors
- Blocked ultragoal checkpoints require either a get_goal snap
- Cannot record a blocked ultragoal checkpoint while the exist
- Blocked ultragoal checkpoint is only for a different complet
- Cannot record a blocked checkpoint for ${goal.id} while it i
- Blocked ultragoal checkpoint Codex snapshot is missing objec
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/f14d99b74c3b4e23.
Report an issue: GitHub.