{"record":{"id":"3afaa0eab7479bef","repo":"Yeachan-Heo/oh-my-codex","slug":"invalid-setup-team-mode-next-expected-one-of","errorCode":null,"errorMessage":"Invalid setup Team mode: ${next}. Expected one of: enabled, disabled","messagePattern":"Invalid setup Team mode: (.+?)\\. Expected one of: enabled, disabled","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/index.ts","lineNumber":709,"sourceCode":"  }\n  throw new Error(\n    `Invalid setup scope: ${value}. Expected one of: ${SETUP_SCOPES.join(\", \")}`,\n  );\n}\n\nexport function resolveSetupTeamModeArg(args: string[]): SetupTeamMode | undefined {\n  let value: SetupTeamMode | undefined;\n  const setValue = (next: SetupTeamMode, source: string): void => {\n    if (value && value !== next) {\n      throw new Error(\n        `Conflicting setup Team mode flags: ${source} selects ${next}, but another flag already selected ${value}`,\n      );\n    }\n    value = next;\n  };\n  const parseValue = (next: string): SetupTeamMode => {\n    if (!SETUP_TEAM_MODES.includes(next as SetupTeamMode)) {\n      throw new Error(\n        `Invalid setup Team mode: ${next}. Expected one of: enabled, disabled`,\n      );\n    }\n    return next as SetupTeamMode;\n  };\n\n  for (let index = 0; index < args.length; index += 1) {\n    const arg = args[index];\n    if (arg === \"--disable-team\" || arg === \"--no-team\") {\n      setValue(\"disabled\", arg);\n      continue;\n    }\n    if (arg === \"--enable-team\" || arg === \"--team\") {\n      setValue(\"enabled\", arg);\n      continue;\n    }\n    if (arg === \"--team-mode\") {\n      const next = args[index + 1];","sourceCodeStart":691,"sourceCodeEnd":727,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/index.ts#L691-L727","documentation":"The Team mode value must be `enabled` or `disabled` (SETUP_TEAM_MODES). Supplied via --team-mode <value> or --team-mode=<value>; anything else throws.","triggerScenarios":"`--team-mode on`, `--team-mode enable`, wrong casing.","commonSituations":"Assuming boolean-ish synonyms like on/off/true/false are accepted.","solutions":["Use `enabled` or `disabled` exactly","Prefer the shorthand flags --team/--no-team"],"exampleFix":"# before\nomx setup --team-mode on\n# after\nomx setup --team-mode enabled","handlingStrategy":"type-guard","validationCode":"if (!['enabled','disabled'].includes(value)) throw new Error('invalid Team mode');","typeGuard":"const isSetupTeamMode = (v: string): v is 'enabled' | 'disabled' => v === 'enabled' || v === 'disabled';","tryCatchPattern":null,"preventionTips":["Use enabled/disabled, not on/off/true/false"],"tags":["cli","invalid-value","enum-validation","team"],"backgroundTag":"invalid-cli-flag-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}