{"record":{"id":"918c57fd6a302c93","repo":"Yeachan-Heo/oh-my-codex","slug":"missing-slug","errorCode":null,"errorMessage":"Missing --slug.","messagePattern":"Missing --slug\\.","errorType":"validation","errorClass":"AutoresearchGoalError","httpStatus":null,"severity":"error","filePath":"src/cli/autoresearch-goal.ts","lineNumber":117,"sourceCode":"        topic: topic ?? '',\n        rubric: rubric ?? '',\n        slug: readValue(rest, '--slug'),\n        criticCommand: readValue(rest, '--critic-command'),\n        force: hasFlag(rest, '--force'),\n      });\n      if (json) printJson({ ok: true, mission });\n      else {\n        console.log(`autoresearch-goal created: ${mission.slug}`);\n        console.log(`mission: ${mission.mission_path}`);\n        console.log(`rubric: ${mission.rubric_path}`);\n        console.log(`ledger: ${mission.ledger_path}`);\n      }\n      return;\n    }\n\n    if (command === 'handoff' || command === 'start') {\n      const slug = readValue(rest, '--slug');\n      if (!slug) throw new AutoresearchGoalError('Missing --slug.');\n      const instruction = await buildAutoresearchGoalHandoff(cwd, slug);\n      if (json) printJson({ ok: true, instruction });\n      else console.log(instruction);\n      return;\n    }\n\n    if (command === 'verdict' || command === 'checkpoint') {\n      const slug = readValue(rest, '--slug');\n      if (!slug) throw new AutoresearchGoalError('Missing --slug.');\n      const result = await recordAutoresearchGoalVerdict(cwd, {\n        slug,\n        verdict: parseVerdict(readValue(rest, '--verdict')),\n        evidence: readValue(rest, '--evidence') ?? '',\n        summary: readValue(rest, '--summary'),\n        artifactPath: readValue(rest, '--artifact'),\n      });\n      if (json) printJson({ ok: true, ...result });\n      else console.log(`autoresearch-goal verdict: ${result.mission.slug} -> ${result.completion.verdict}`);","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/autoresearch-goal.ts#L99-L135","documentation":"The autoresearch-goal handoff/start subcommand requires --slug to identify which goal to build a handoff for. Thrown when readValue(rest, '--slug') returns undefined.","triggerScenarios":"Running `omx autoresearch-goal handoff` or `start` without --slug, or with --slug as the last token / followed by another flag (which raises error 108 instead).","commonSituations":"Forgetting the slug after copying a command template, or an empty slug variable in a pipeline script.","solutions":["Add --slug <goal-slug> identifying an existing autoresearch goal","Confirm the slug matches a goal created earlier (check via the status subcommand)","Use the --slug=value form for scripting safety"],"exampleFix":"// before\nomx autoresearch-goal handoff\n// after\nomx autoresearch-goal handoff --slug my-goal","handlingStrategy":"validation","validationCode":"if (!args.some(a => a === '--slug' || a.startsWith('--slug=')) || !slugValue) {\n  throw new UsageError('handoff/start requires --slug');\n}","typeGuard":"const hasSlug = (a: string[]) => a.includes('--slug') || a.some(s => s.startsWith('--slug='));","tryCatchPattern":"try { await autoresearchGoalCommand(argv); } catch (e) { if (e instanceof AutoresearchGoalError && e.message === 'Missing --slug.') promptForSlug(); else throw e; }","preventionTips":["Keep a single source of truth for goal slugs in pipelines","Assert required flags before invoking the CLI"],"tags":["cli","missing-argument","slug"],"backgroundTag":"missing-required-flag","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}