Yeachan-Heo/oh-my-codex · error · Error
Unknown omx update option: ${arg}. Expected no flags, --stab
Error message
Unknown omx update option: ${arg}. Expected no flags, --stable, or --dev. What it means
The `omx update` command accepts only no flags, --stable, or --dev. Any other token starting with `-` is rejected as unknown.
Source
Thrown at src/cli/index.ts:799
}
export function resolveUpdateChannelArg(args: string[]): UpdateChannel {
let channel: UpdateChannel = 'stable';
let sawStable = false;
let sawDev = false;
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);
}
View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Remove the unsupported flag
- Use --stable or --dev to pick a channel, or nothing for default
Example fix
# before omx update --channel beta # after omx update --dev
Defensive patterns
Strategy: validation
Validate before calling
const allowed = new Set(['--stable', '--dev']);
for (const a of args) if (a.startsWith('-') && !allowed.has(a)) throw new Error(`unknown update option: ${a}`); Try / catch
catch (e) { if (/Unknown omx update option/.test(e.message)) /* print usage and exit 2 */ } Prevention
- omx update takes only --stable or --dev
When it happens
Trigger: `omx update --channel dev`, `omx update --force`, or any unrecognized flag.
Common situations: Habitual flags from other package managers (npm/yarn style) applied to the updater; outdated docs.
Related errors
- omx update --dev and --stable are mutually exclusive.
- Unknown agents-init option: ${arg}\n${AGENTS_INIT_USAGE}
- Unknown argument for "omx team api": ${token}
- Unknown exec inject argument: ${arg}
- Unknown imagegen continuation argument: ${arg}
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/76ab776caed3f9b0.
Report an issue: GitHub.