{"record":{"id":"d36309456d69e195","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-mission-option-arg","errorCode":null,"errorMessage":"Unknown mission option: ${arg}","messagePattern":"Unknown mission option: (.+?)","errorType":"exception","errorClass":"MissionCommandError","httpStatus":null,"severity":"error","filePath":"src/cli/mission.ts","lineNumber":224,"sourceCode":"    if (arg === \"--task\") {\n      taskId = readValue(commandArgs, index, arg);\n      index += 1;\n      continue;\n    }\n    if (arg.startsWith(\"--status=\")) {\n      const value = arg.slice(\"--status=\".length);\n      if (value !== \"blocked\" && value !== \"needs-human-review\") throw new MissionCommandError(`Unsupported mission mark status: ${value}`);\n      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,","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/mission.ts#L206-L242","documentation":"Generic unknown-option error: any argument starting with -- that doesn't match a known mission option reaches this throw. Note codex passthrough args must be provided via the designated mechanism, not as raw -- flags.","triggerScenarios":"`mission run m.md --verbose`, `--force`, or a mistyped flag like `--jsno` instead of --json.","commonSituations":"Typos in flags; assuming options from other subcommands (e.g. --task on run) exist; trying to pass codex flags directly without the passthrough syntax.","solutions":["Check the flag spelling against MISSION_HELP","Remove unsupported flags","Pass runner-specific args through the documented codex-args mechanism rather than raw -- flags"],"exampleFix":"# before\nmission run mission.md --dryrun\n# after\nmission run mission.md --dry-run","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['--dry-run','--continue-on-error','--json','--task','--status','--slug','--summary','--codex']);\nconst unknown = args.filter(a => a.startsWith('--') && !KNOWN.has(a.split('=')[0]));\nif (unknown.length) failEarly(unknown);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize the allowed flag list in your wrapper","Print the MISSION_HELP text on unknown options in your own tooling"],"tags":["cli","argument-validation","unknown-option"],"backgroundTag":"unknown-cli-option","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}