Yeachan-Heo/oh-my-codex · error · Error

omx update --dev and --stable are mutually exclusive.

Error message

omx update --dev and --stable are mutually exclusive.

What it means

--stable and --dev select mutually exclusive release channels for `omx update`; specifying both is contradictory and rejected after parsing.

Source

Thrown at src/cli/index.ts:805

  for (const arg of args) {
    if (arg === '--stable') {
      sawStable = true;
      channel = 'stable';
      continue;
    }
    if (arg === '--dev') {
      sawDev = true;
      channel = 'dev';
      continue;
    }
    throw new Error(
      `Unknown omx update option: ${arg}. Expected no flags, --stable, or --dev.`,
    );
  }

  if (sawStable && sawDev) {
    throw new Error('omx update --dev and --stable are mutually exclusive.');
  }

  return channel;
}

export function resolveNotifyTempContract(
  args: string[],
  env: NodeJS.ProcessEnv = process.env,
): ParseNotifyTempContractResult {
  return parseNotifyTempContractFromArgs(args, env);
}

export function commandOwnsLocalHelp(command: CliCommand): boolean {
  return NESTED_HELP_COMMANDS.has(command);
}

export type CodexLaunchPolicy = "inside-tmux" | "detached-tmux" | "direct";

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Remove one of the two channel flags
  2. Set the desired channel once via config and omit flags

Example fix

# before
omx update --stable --dev
# after
omx update --stable
Defensive patterns

Strategy: validation

Validate before calling

const has = (f: string) => args.includes(f);
if (has('--stable') && has('--dev')) throw new Error('mutually exclusive');

Prevention

When it happens

Trigger: `omx update --stable --dev` (in any order).

Common situations: Copy-paste accumulation of flags; scripts combining a default channel with a user override.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/e422ea29f9258315. Report an issue: GitHub.