Yeachan-Heo/oh-my-codex · error · MissionCommandError
Missing mission input file. ${MISSION_HELP}
Error message
Missing mission input file.
${MISSION_HELP} What it means
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.
Source
Thrown at src/cli/mission.ts:232
markStatus = value;
continue;
}
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,
};
}View on GitHub (pinned to 3ad79a8a6f)
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
Example fix
# before mission run --dry-run # after mission run mission.md --dry-run
Defensive patterns
Strategy: validation
Validate before calling
if (!args.some(a => !a.startsWith('--') && a !== action)) {
console.error('mission input file required'); process.exit(2);
} Prevention
- Make file presence the first check in wrapper scripts
When it happens
Trigger: `mission run` with no file, `mission run --json` (flags only, no positional), or a file argument consumed incorrectly by earlier parsing.
Common situations: Forgetting the file argument when testing flags; a flag-with-value form swallowing the file token in custom wrappers.
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}.
- mission rerun requires --task <id>.
- 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/bab157d3a4477cca.
Report an issue: GitHub.