{"record":{"id":"741075e00a5b184d","repo":"Yeachan-Heo/oh-my-codex","slug":"invalid-kind-raw-expected-one-of-array-fr","errorCode":null,"errorMessage":"Invalid --kind: ${raw}. Expected one of ${Array.from(STEERING_KINDS).join(', ')}.","messagePattern":"Invalid --kind: (.+?)\\. Expected one of (.+?)\\.","errorType":"exception","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/cli/ultragoal.ts","lineNumber":224,"sourceCode":"    ? readRoleRoutingMarker(scope.baseStateDir, { cwd: scope.cwd, sessionId: scope.sessionId })\n    : null;\n  return resolveNativeSubagentSupportStatus({\n    persistedSupportBlocker,\n    persistedRoleRoutingMarker,\n    persistedCapacityBlocker,\n    cwd: scope.cwd,\n    sessionId: scope.sessionId,\n  });\n}\n\nconst STEERING_KINDS = new Set<UltragoalSteeringMutationKind>(ULTRAGOAL_STEERING_MUTATION_KINDS);\nconst STEERING_SOURCES = new Set<UltragoalSteeringSource>(ULTRAGOAL_STEERING_SOURCES);\n\ntype CliSteerResult = Awaited<ReturnType<typeof steerUltragoal>>;\n\nfunction parseSteeringKind(raw: string | undefined): UltragoalSteeringMutationKind {\n  if (!raw) throw new UltragoalError('Missing --kind for structured ultragoal steer.');\n  if (!STEERING_KINDS.has(raw as UltragoalSteeringMutationKind)) throw new UltragoalError(`Invalid --kind: ${raw}. Expected one of ${Array.from(STEERING_KINDS).join(', ')}.`);\n  return raw as UltragoalSteeringMutationKind;\n}\n\nfunction parseSteeringSource(raw: string | undefined, fallback: UltragoalSteeringSource = 'cli'): UltragoalSteeringSource {\n  if (!raw) return fallback;\n  if (!STEERING_SOURCES.has(raw as UltragoalSteeringSource)) throw new UltragoalError(`Invalid --source: ${raw}. Expected one of ${Array.from(STEERING_SOURCES).join(', ')}.`);\n  return raw as UltragoalSteeringSource;\n}\n\nfunction assertPlainObject(value: unknown, label: string): Record<string, unknown> {\n  if (!value || typeof value !== 'object' || Array.isArray(value)) throw new UltragoalError(`${label} must be a JSON object.`);\n  return value as Record<string, unknown>;\n}\n\nfunction normalizeTargetGoalId(raw: Record<string, unknown>): string | undefined {\n  if (typeof raw.targetGoalId === 'string' && raw.targetGoalId.trim()) return raw.targetGoalId.trim();\n  if (Array.isArray(raw.targetGoalIds)) return raw.targetGoalIds.find((id): id is string => typeof id === 'string' && id.trim().length > 0)?.trim();\n  return undefined;","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/ultragoal.ts#L206-L242","documentation":"--kind was provided but is not a member of ULTRAGOAL_STEERING_MUTATION_KINDS. The message helpfully lists every accepted value, so compare your spelling against it.","triggerScenarios":"Passing e.g. `--kind pause` or `--kind Add_Goal` (wrong casing/snake form) to `omx ultragoal steer` when the accepted set is things like add_goal/update_goal/record_blocker per the engine's enum.","commonSituations":"Version drift: the enum gained/renamed kinds between releases; guessing kind names from the directive schema; locale casing issues from scripted input.","solutions":["Re-run and copy one of the exact values listed in the error message itself","Check the current ULTRAGOAL_STEERING_MUTATION_KINDS export (or --help) for your installed version","Update the package if docs mention a kind your version rejects"],"exampleFix":"# before\nomx ultragoal steer --kind pause --evidence e --rationale r\n# Error: Invalid --kind: pause. Expected one of add_goal, update_goal, ...\n\n# after\nomx ultragoal steer --kind update_goal --evidence e --rationale r --goal-id g1 --status paused","handlingStrategy":"type-guard","validationCode":"const KINDS = new Set(ULTRAGOAL_STEERING_MUTATION_KINDS as readonly string[]);\nif (!KINDS.has(kind)) { console.error(`kind must be one of: ${[...KINDS].join(', ')}`); process.exit(2); }","typeGuard":"function isValidSteeringKind(v: string, valid: ReadonlySet<string>): v is (typeof ULTRAGOAL_STEERING_MUTATION_KINDS)[number] {\n  return valid.has(v);\n}","tryCatchPattern":null,"preventionTips":["Copy enum values from the error text or the exported ULTRAGOAL_STEERING_MUTATION_KINDS constant","Re-validate enums after package upgrades"],"tags":["cli","ultragoal","enum","argument-validation"],"backgroundTag":"invalid-cli-flag-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}