{"record":{"id":"bab157d3a4477cca","repo":"Yeachan-Heo/oh-my-codex","slug":"missing-mission-input-file-mission-help","errorCode":null,"errorMessage":"Missing mission input file.\n\n${MISSION_HELP}","messagePattern":"Missing mission input file\\.\n\n(.+?)","errorType":"exception","errorClass":"MissionCommandError","httpStatus":null,"severity":"error","filePath":"src/cli/mission.ts","lineNumber":232,"sourceCode":"      markStatus = value;\n      continue;\n    }\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}","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/mission.ts#L214-L250","documentation":"Thrown after parsing when no positional input file was given. All mission actions require a mission input file path; the message appends the full MISSION_HELP text.","triggerScenarios":"`mission run` with no file, `mission run --json` (flags only, no positional), or a file argument consumed incorrectly by earlier parsing.","commonSituations":"Forgetting the file argument when testing flags; a flag-with-value form swallowing the file token in custom wrappers.","solutions":["Add the mission input file path: mission run <file>","Reorder so the file is a positional argument after the action","Consult the MISSION_HELP block included in the error message for exact usage"],"exampleFix":"# before\nmission run --dry-run\n# after\nmission run mission.md --dry-run","handlingStrategy":"validation","validationCode":"if (!args.some(a => !a.startsWith('--') && a !== action)) {\n  console.error('mission input file required'); process.exit(2);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make file presence the first check in wrapper scripts"],"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"}