{"record":{"id":"1ee92f00d3bae746","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-autopilot-command-command-n-autopilot","errorCode":null,"errorMessage":"Unknown autopilot command: ${command}\\n${AUTOPILOT_HELP}","messagePattern":"Unknown autopilot command: (.+?)\\\\n(.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/autopilot.ts","lineNumber":160,"sourceCode":"\n  if (command === 'advance') {\n    const to = value(rest, '--to');\n    if (to !== 'ralplan' && to !== 'ultragoal') throw new Error('--to must be ralplan or ultragoal.');\n    const rawHandoff = value(rest, '--handoff-json');\n    if (!rawHandoff) throw new Error('Missing --handoff-json.');\n    const handoff = await jsonInput(rawHandoff);\n    assertBoundHandoffIdentity(handoff, cwd, sessionId);\n    const updated = await updateAutopilotPipelineState({\n      ...handoff,\n      active: true,\n      current_phase: to,\n    }, cwd, sessionId);\n    if (json) stdout(JSON.stringify({ ok: true, state: updated, instruction: instruction(updated) }));\n    else stdout(instruction(updated));\n    return;\n  }\n\n  throw new Error(`Unknown autopilot command: ${command}\\n${AUTOPILOT_HELP}`);\n}\n","sourceCodeStart":142,"sourceCodeEnd":162,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/autopilot.ts#L142-L162","documentation":"autopilotCommand throws this for any subcommand it does not recognize, appending the full AUTOPILOT_HELP text. Recognized subcommands are help/start/status/next/advance.","triggerScenarios":"Running `omx autopilot <cmd>` where cmd is not one of the handled branches — e.g. 'stop', 'resume', 'run', or a typo like 'stat'.","commonSituations":"Using subcommands from older versions or other tools, shell aliases, or expecting a stop/pause command that does not exist.","solutions":["Read the help text included in the error message and use a listed subcommand (help, start, status, next, advance)","Check for typos in the subcommand (e.g. 'stat' vs 'status')","If you need a different lifecycle operation, check the project docs — it may live under another CLI module"],"exampleFix":"// before\nomx autopilot stat\n// after\nomx autopilot status","handlingStrategy":"validation","validationCode":"const KNOWN = ['help','start','status','next','advance'];\nif (!KNOWN.includes(cmd)) { print(AUTOPILOT_HELP); process.exit(2); }","typeGuard":"const isAutopilotCmd = (c: string): c is 'help'|'start'|'status'|'next'|'advance' => ['help','start','status','next','advance'].includes(c);","tryCatchPattern":"try { await autopilotCommand(argv); } catch (e) { if (e.message.startsWith('Unknown autopilot command')) printHelpFromError(e); else throw e; }","preventionTips":["Validate subcommands before invoking in automation","Parse the help text appended to the error for valid commands"],"tags":["cli","unknown-command","autopilot"],"backgroundTag":"unknown-subcommand","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}