{"record":{"id":"240c43a8faa34641","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-autoresearch-goal-command-command-n-n","errorCode":null,"errorMessage":"Unknown autoresearch-goal command: ${command}\\n\\n${AUTORESEARCH_GOAL_HELP}","messagePattern":"Unknown autoresearch-goal command: (.+?)\\\\n\\\\n(.+?)","errorType":"validation","errorClass":"AutoresearchGoalError","httpStatus":null,"severity":"error","filePath":"src/cli/autoresearch-goal.ts","lineNumber":173,"sourceCode":"      const slug = readValue(rest, '--slug');\n      if (!slug) throw new AutoresearchGoalError('Missing --slug.');\n      const mission = await readAutoresearchGoal(cwd, slug);\n      const completion = await readAutoresearchGoalCompletion(cwd, slug);\n      const snapshot = await readCodexGoalSnapshotInput(readValue(rest, '--codex-goal-json'), cwd);\n      const reconciliation = reconcileAutoresearchCodexGoalSnapshot(snapshot, mission, {\n        requireSnapshot: false,\n        requireComplete: mission.status === 'complete',\n      });\n      if (json) printJson({ mission, completion, reconciliation });\n      else {\n        console.log(`autoresearch-goal: ${mission.slug} [${mission.status}] ${mission.topic}`);\n        console.log(`completion: ${completion ? `${completion.verdict} (${completion.recorded_at})` : 'missing'}`);\n        if (!reconciliation.ok || reconciliation.warnings.length) console.log(`codex goal warning: ${formatCodexGoalReconciliation(reconciliation)}`);\n      }\n      return;\n    }\n\n    throw new AutoresearchGoalError(`Unknown autoresearch-goal command: ${command}\\n\\n${AUTORESEARCH_GOAL_HELP}`);\n  } catch (error) {\n    if (error instanceof AutoresearchGoalError || error instanceof CodexGoalSnapshotError) {\n      console.error(`[autoresearch-goal] ${error.message}`);\n      process.exitCode = 1;\n      return;\n    }\n    throw error;\n  }\n}\n","sourceCodeStart":155,"sourceCodeEnd":183,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/autoresearch-goal.ts#L155-L183","documentation":"autoresearchGoalCommand throws this AutoresearchGoalError for any subcommand it does not handle (help, handoff/start, verdict/checkpoint, complete, status are handled), appending AUTORESEARCH_GOAL_HELP. The error is caught in-command, printed as `[autoresearch-goal] ...`, and exit code 1 is set.","triggerScenarios":"Running `omx autoresearch-goal <cmd>` with an unrecognized cmd such as 'list', 'create', 'delete', or a typo like 'handof'.","commonSituations":"Expecting goal-management subcommands (create/delete/list) that do not exist in this CLI, version drift where subcommands were renamed, or shell autocomplete suggesting wrong names.","solutions":["Read the help text embedded in the error message for valid subcommands","Fix typos (e.g. 'handof' → 'handoff')","If you need to create goals, check other CLI modules or docs — creation may not be via this command"],"exampleFix":"// before\nomx autoresearch-goal list\n// after\nomx autoresearch-goal help","handlingStrategy":"validation","validationCode":"const KNOWN = ['help','handoff','start','verdict','checkpoint','complete','status'];\nif (!KNOWN.includes(cmd)) { print(AUTORESEARCH_GOAL_HELP); process.exit(2); }","typeGuard":"const isGoalCmd = (c: string): c is 'help'|'handoff'|'start'|'verdict'|'checkpoint'|'complete'|'status' => ['help','handoff','start','verdict','checkpoint','complete','status'].includes(c);","tryCatchPattern":"try { await autoresearchGoalCommand(argv); } catch (e) { if (e instanceof AutoresearchGoalError && e.message.startsWith('Unknown autoresearch-goal command')) printHelpFromError(e); else throw e; }","preventionTips":["Check the embedded help text for valid subcommands","Beware that unknown-command errors set process.exitCode = 1 rather than throwing to the caller"],"tags":["cli","unknown-command"],"backgroundTag":"unknown-subcommand","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}