{"record":{"id":"71ab23b614ae0089","repo":"Yeachan-Heo/oh-my-codex","slug":"mission-rerun-requires-task-id","errorCode":null,"errorMessage":"mission rerun requires --task <id>.","messagePattern":"mission rerun requires --task <id>\\.","errorType":"validation","errorClass":"MissionCommandError","httpStatus":null,"severity":"error","filePath":"src/cli/mission.ts","lineNumber":234,"sourceCode":"    }\n    if (arg === \"--status\") {\n      const value = readValue(commandArgs, index, arg);\n      if (value !== \"blocked\" && value !== \"needs-human-review\") throw new MissionCommandError(`Unsupported mission mark status: ${value}`);\n      markStatus = value;\n      index += 1;\n      continue;\n    }\n    if (arg.startsWith(\"--\")) throw new MissionCommandError(`Unknown mission option: ${arg}`);\n    if (!file) {\n      file = arg;\n      continue;\n    }\n    throw new MissionCommandError(`Unexpected mission argument: ${arg}`);\n  }\n\n  if (!file) throw new MissionCommandError(`Missing mission input file.\\n\\n${MISSION_HELP}`);\n  if (action !== \"rerun\" && action !== \"mark\" && taskId) throw new MissionCommandError(`--task is only supported for mission mark/rerun.`);\n  if (action === \"rerun\" && !taskId) throw new MissionCommandError(`mission rerun requires --task <id>.`);\n  if (action !== \"mark\" && markStatus) throw new MissionCommandError(`--status is only supported for mission mark.`);\n  if (action === \"mark\" && (!taskId || !markStatus)) throw new MissionCommandError(`mission mark requires --task <id> --status <blocked|needs-human-review>.`);\n  return { action, file, dryRun, continueOnError, json, slug, summaryPath, taskId, markStatus, codexArgs };\n}\n\nfunction missionCounts(tasks: MissionTask[]): MissionSummary[\"counts\"] {\n  return {\n    total: tasks.length,\n    planned: tasks.filter((task) => task.status === \"planned\").length,\n    passed: tasks.filter((task) => task.status === \"passed\").length,\n    failed: tasks.filter((task) => task.status === \"failed\").length,\n    skipped: tasks.filter((task) => task.status === \"skipped\").length,\n    blocked: tasks.filter((task) => task.status === \"blocked\").length,\n    \"needs-human-review\": tasks.filter((task) => task.status === \"needs-human-review\").length,\n  };\n}\n\nfunction missionStatus(tasks: MissionTask[]): MissionSummary[\"status\"] {","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/mission.ts#L216-L252","documentation":"Post-parse validation: the rerun action was selected but no --task id was provided. rerun re-executes exactly one task, so the id is mandatory.","triggerScenarios":"`mission rerun mission.md` with no --task flag, or --task given without a value so it isn't recorded.","commonSituations":"Assuming rerun re-runs all failed tasks; --task at the end of the command with the value missing or swallowed by another flag.","solutions":["Add --task <id>: mission rerun mission.md --task t1","Verify the task id exists in the summary via mission status --json","Use resume (not rerun) to continue an interrupted mission"],"exampleFix":"# before\nmission rerun mission.md\n# after\nmission rerun mission.md --task t1","handlingStrategy":"validation","validationCode":"if (action === 'rerun' && !args.includes('--task') && !args.some(a => a.startsWith('--task='))) {\n  failEarly('rerun requires --task <id>');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prompt for the task id when building rerun commands interactively"],"tags":["cli","missing-argument","mission"],"backgroundTag":"missing-required-argument","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}