{"record":{"id":"b52dd909081f18f6","repo":"Yeachan-Heo/oh-my-codex","slug":"missing-goal-id","errorCode":null,"errorMessage":"Missing --goal-id.","messagePattern":"Missing --goal-id\\.","errorType":"exception","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/cli/ultragoal.ts","lineNumber":475,"sourceCode":"        if (!result.accepted) process.exitCode = 1;\n        return;\n      }\n      const proposal = await parseSteeringProposal(rest);\n      if (!proposal.evidence?.trim?.()) throw new UltragoalError('Missing --evidence.');\n      if (!proposal.rationale?.trim?.()) throw new UltragoalError('Missing --rationale.');\n      proposal.source = parseSteeringSource(source, proposal.source);\n      const result = await steerUltragoal(cwd, proposal, { directiveText: buildSteerDirectiveText(rest) });\n      printSteerResult(proposal, result, json);\n      if (!result.accepted) process.exitCode = 1;\n      return;\n    }\n\n    if (command === 'record-review-blockers') {\n      const goalId = readValue(rest, '--goal-id');\n      const title = readValue(rest, '--title');\n      const objective = readValue(rest, '--objective');\n      const evidence = readValue(rest, '--evidence');\n      if (!goalId) throw new UltragoalError('Missing --goal-id.');\n      if (!title?.trim()) throw new UltragoalError('Missing --title.');\n      if (!objective?.trim()) throw new UltragoalError('Missing --objective.');\n      if (!evidence?.trim()) throw new UltragoalError('Missing --evidence.');\n      const codexGoal = await parseCodexGoalJson(readValue(rest, '--codex-goal-json'));\n      const result = await recordFinalReviewBlockers(cwd, { goalId, title, objective, evidence, codexGoal });\n      if (json) printJson({ ok: true, plan: result.plan, blockedGoal: result.blockedGoal, addedGoal: result.addedGoal, summary: summarizeUltragoalPlan(result.plan) });\n      else {\n        console.log(`ultragoal final review blockers recorded: ${result.blockedGoal.id} -> review_blocked; added ${result.addedGoal.id}`);\n        printStatus(result.plan);\n      }\n      return;\n    }\n\n    if (command === 'complete' || command === 'complete-goals' || command === 'next' || command === 'start-next') {\n      const result = await startNextUltragoal(cwd, { retryFailed: hasFlag(rest, '--retry-failed') });\n      if (!result.goal) {\n        const handoff = blockedDecisionHandoff(result.plan);\n        if (json) {","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/ultragoal.ts#L457-L493","documentation":"record-review-blockers records final-review blockers against an existing goal, so --goal-id is mandatory to know which goal to block. It is the first of four required flags checked (--goal-id, --title, --objective, --evidence) before recordFinalReviewBlockers runs.","triggerScenarios":"`omx ultragoal record-review-blockers --title t --objective o --evidence e` with no --goal-id.","commonSituations":"Assuming the CLI infers the current goal from context (`status`/`next`); id copied from JSON but stripped by shell quoting; goal id renamed between versions.","solutions":["Get the id via `omx ultragoal status` (or --json and jq '.plan.goals[].id') and pass `--goal-id <id>`","Quote the id: --goal-id \"$GOAL_ID\" and assert it is set in scripts"],"exampleFix":"# before\nomx ultragoal record-review-blockers --title t --objective o --evidence e\n# Error: Missing --goal-id.\n\n# after\nomx ultragoal record-review-blockers --goal-id goal-3 --title t --objective o --evidence e","handlingStrategy":"validation","validationCode":"if (!goalId) { console.error('--goal-id required; get one from `omx ultragoal status --json`'); process.exit(2); }","typeGuard":"function isGoalId(v: string | undefined): v is string {\n  return !!v && /^goal(-\\w+)?$/.test(v.trim()); // adjust to your id format\n}","tryCatchPattern":null,"preventionTips":["Fetch goal ids from status --json via jq rather than hand-copying","Quote ids in shell; assert env-provided ids are set"],"tags":["cli","ultragoal","missing-argument"],"backgroundTag":"missing-required-cli-flag","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}