Yeachan-Heo/oh-my-codex · error · MissionCommandError
mission rerun requires --task <id>.
Error message
mission rerun requires --task <id>.
What it means
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.
Source
Thrown at src/cli/mission.ts:234
}
if (arg === "--status") {
const value = readValue(commandArgs, index, arg);
if (value !== "blocked" && value !== "needs-human-review") throw new MissionCommandError(`Unsupported mission mark status: ${value}`);
markStatus = value;
index += 1;
continue;
}
if (arg.startsWith("--")) throw new MissionCommandError(`Unknown mission option: ${arg}`);
if (!file) {
file = arg;
continue;
}
throw new MissionCommandError(`Unexpected mission argument: ${arg}`);
}
if (!file) throw new MissionCommandError(`Missing mission input file.\n\n${MISSION_HELP}`);
if (action !== "rerun" && action !== "mark" && taskId) throw new MissionCommandError(`--task is only supported for mission mark/rerun.`);
if (action === "rerun" && !taskId) throw new MissionCommandError(`mission rerun requires --task <id>.`);
if (action !== "mark" && markStatus) throw new MissionCommandError(`--status is only supported for mission mark.`);
if (action === "mark" && (!taskId || !markStatus)) throw new MissionCommandError(`mission mark requires --task <id> --status <blocked|needs-human-review>.`);
return { action, file, dryRun, continueOnError, json, slug, summaryPath, taskId, markStatus, codexArgs };
}
function missionCounts(tasks: MissionTask[]): MissionSummary["counts"] {
return {
total: tasks.length,
planned: tasks.filter((task) => task.status === "planned").length,
passed: tasks.filter((task) => task.status === "passed").length,
failed: tasks.filter((task) => task.status === "failed").length,
skipped: tasks.filter((task) => task.status === "skipped").length,
blocked: tasks.filter((task) => task.status === "blocked").length,
"needs-human-review": tasks.filter((task) => task.status === "needs-human-review").length,
};
}
function missionStatus(tasks: MissionTask[]): MissionSummary["status"] {View on GitHub (pinned to 3ad79a8a6f)
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
Example fix
# before mission rerun mission.md # after mission rerun mission.md --task t1
Defensive patterns
Strategy: validation
Validate before calling
if (action === 'rerun' && !args.includes('--task') && !args.some(a => a.startsWith('--task='))) {
failEarly('rerun requires --task <id>');
} Prevention
- Prompt for the task id when building rerun commands interactively
When it happens
Trigger: `mission rerun mission.md` with no --task flag, or --task given without a value so it isn't recorded.
Common situations: Assuming rerun re-runs all failed tasks; --task at the end of the command with the value missing or swallowed by another flag.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Missing value for ${flag}.
- Missing mission input file. ${MISSION_HELP}
- mission mark requires --task <id> --status <blocked|needs-hu
- Usage: omx auth add <slot> [--device-auth|--with-api-key|--w
- Usage: omx auth use <slot>
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/71ab23b614ae0089.
Report an issue: GitHub.