{"record":{"id":"94750b171f46bbf4","repo":"Yeachan-Heo/oh-my-codex","slug":"blocked-ultragoal-checkpoints-require-either-a-get","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"validation","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/ultragoal/artifacts.ts","lineNumber":1816,"sourceCode":"    if (snapshot?.unavailableReason === 'db_schema_context_error') {\n      goal.updatedAt = now;\n      goal.failureReason = assertNonEmpty(options.evidence, '--evidence');\n      plan.activeGoalId = goal.id;\n      plan.updatedAt = now;\n      await writePlan(cwd, plan);\n      await appendLedger(cwd, {\n        ts: now,\n        event: 'goal_blocked',\n        goalId: goal.id,\n        status: goal.status,\n        evidence: options.evidence,\n        codexGoal: options.codexGoal,\n        message: 'Codex get_goal was unavailable due to a DB/schema/context error; strict completion reconciliation is deferred until get_goal works.',\n      });\n      return plan;\n    }\n    if (!snapshot?.available) {\n      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.');\n    }\n    if (!snapshot.objective) {\n      throw new UltragoalError('Blocked ultragoal checkpoint Codex snapshot is missing objective text.');\n    }\n    const blockedSnapshotMatchesExpected = [expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)]\n      .some((objective) => normalizeObjective(objective) === normalizeObjective(snapshot.objective ?? ''));\n    if (snapshot.status === 'blocked') {\n      if (!blockedSnapshotMatchesExpected) {\n        throw new UltragoalError(\n          `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.`,\n        );\n      }\n      const evidence = assertNonEmpty(options.evidence, '--evidence');\n      goal.updatedAt = now;\n      plan.activeGoalId = goal.id;\n      plan.updatedAt = now;\n      await writePlan(cwd, plan);\n      await appendLedger(cwd, {","sourceCodeStart":1798,"sourceCodeEnd":1834,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/ultragoal/artifacts.ts#L1798-L1834","documentation":"A blocked checkpoint requires a Codex get_goal snapshot proving the blocking condition, but the provided --codex-goal-json is missing, unparseable, or marks the snapshot as unavailable for a reason other than the accepted db_schema_context_error. The strict reconciliation layer refuses to record a native blocked checkpoint without that evidence.","triggerScenarios":"Calling checkpointUltragoal with status 'blocked' where options.codexGoal is undefined, or the parsed snapshot has available !== true and no db_schema_context_error unavailableReason that would defer reconciliation.","commonSituations":"Forgetting to pass --codex-goal-json; passing malformed get_goal output; passing a get_goal error JSON whose error category is not a DB/schema/context failure so it can't be deferred.","solutions":["Re-run Codex get_goal and pass its JSON via --codex-goal-json with the snapshot available","If get_goal itself is failing on a Codex DB/schema/context error, pass that error JSON so the checkpoint records the deferred-reconciliation variant","Verify the snapshot parses (parseCodexGoalSnapshot) and has available: true"],"exampleFix":"// before\nawait checkpointUltragoal(cwd, { goalId, status: 'blocked' });\n// after\nawait checkpointUltragoal(cwd, { goalId, status: 'blocked', codexGoal: await codex.getGoalJson(), evidence: 'blocked by upstream migration' });","handlingStrategy":"validation","validationCode":"const snap = parseCodexGoalSnapshot(options.codexGoal ?? '');\nif (!snap || (!snap.available && snap.unavailableReason !== 'db_schema_context_error')) throw new Error('need a get_goal snapshot via --codex-goal-json');","typeGuard":"const hasBlockedEvidence = (s: ReturnType<typeof parseCodexGoalSnapshot> | null) =>\n  !!s && (s.available || s.unavailableReason === 'db_schema_context_error');","tryCatchPattern":null,"preventionTips":["Always fetch fresh get_goal output before recording blocked checkpoints","Verify the snapshot JSON parses and includes availability info"],"tags":["ultragoal","blocked","codex","get-goal","evidence"],"backgroundTag":"missing-required-evidence","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}