{"record":{"id":"a59c9aa236a46964","repo":"Yeachan-Heo/oh-my-codex","slug":"conflicting-setup-team-mode-flags-source-selec","errorCode":null,"errorMessage":"Conflicting setup Team mode flags: ${source} selects ${next}, but another flag already selected ${value}","messagePattern":"Conflicting setup Team mode flags: (.+?) selects (.+?), but another flag already selected (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/index.ts","lineNumber":701,"sourceCode":"    }\n    if (arg.startsWith(\"--scope=\")) {\n      value = arg.slice(\"--scope=\".length);\n    }\n  }\n  if (!value) return undefined;\n  if (SETUP_SCOPES.includes(value as SetupScope)) {\n    return value as SetupScope;\n  }\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);","sourceCodeStart":683,"sourceCodeEnd":719,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/index.ts#L683-L719","documentation":"Team mode flags are mutually exclusive: once a flag selects `enabled` or `disabled`, a later flag selecting the other value throws. Mirrors the install/MCP mode conflict guards.","triggerScenarios":"`omx setup --team --no-team`, or `--team-mode enabled --no-team`.","commonSituations":"Scripted defaults combined with explicit user flags; aliases injecting team flags.","solutions":["Keep only one Team mode selection","Use `--team-mode=<value>` once"],"exampleFix":"# before\nomx setup --team --no-team\n# after\nomx setup --no-team","handlingStrategy":"validation","validationCode":"const teamFlags = args.filter(a => a === '--team' || a === '--no-team' || a.startsWith('--team-mode'));\nif (teamFlags.length > 1) throw new Error('conflicting Team flags');","typeGuard":"const isSetupTeamMode = (v: string): v is SetupTeamMode => ['enabled','disabled'].includes(v);","tryCatchPattern":"catch (e) { if (/Conflicting setup Team mode/.test(e.message)) /* keep --team-mode=value only */ }","preventionTips":["Single Team mode flag per invocation"],"tags":["cli","conflicting-flags","team","setup"],"backgroundTag":"conflicting-cli-flags","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}