Yeachan-Heo/oh-my-codex · error
Unsupported omx question renderer strategy: ${exhaustiveStra
Error message
Unsupported omx question renderer strategy: ${exhaustiveStrategy} What it means
The renderer performs an exhaustive switch over known question renderer strategies and reached the fallback branch, assigning the strategy to `never`. This means a strategy value was passed (or added to the type) that the runtime switch does not handle — typically a typo, a new unhandled strategy, or an unexpected value at runtime.
Source
Thrown at src/question/renderer.ts:1022
throw new Error(`Question UI session ${target} disappeared immediately after launch.`);
}
return {
renderer: 'tmux-session',
target,
launched_at: launchedAt,
};
}
if (strategy === 'test-noop') {
return {
renderer: 'tmux-session',
target: 'test-noop-renderer',
launched_at: launchedAt,
};
}
const exhaustiveStrategy: never = strategy;
throw new Error(`Unsupported omx question renderer strategy: ${exhaustiveStrategy}`);
}
View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Check the exact strategy string you pass against the exported Strategy union type of the version you run
- Upgrade the library so runtime handles all strategies in your types (or downgrade your types)
- Remove `as` casts and let TypeScript catch invalid strategies at compile time
- If you need a no-op (e.g. tests), use the documented noop/test renderer value instead of an ad-hoc string
Example fix
// before
launch({ strategy: 'tmux-popup' as QuestionRendererStrategy });
// after
const strategy: QuestionRendererStrategy = 'tmux-session'; // compile-time checked
launch({ strategy }); Defensive patterns
Strategy: type-guard
Validate before calling
const KNOWN = new Set(['tmux-session','noop' /* ...per version*/]);
if (!KNOWN.has(strategy)) throw new Error(`unknown strategy ${strategy}`); Type guard
function isQuestionRendererStrategy(s: unknown): s is QuestionRendererStrategy {
return typeof s === 'string' && ['tmux-session','noop'].includes(s); // keep in sync with the union
} Try / catch
try { launch({ strategy }); } catch (e) { if (/Unsupported omx question renderer strategy/.test((e as Error).message)) { /* fall back to a known strategy */ } throw e; } Prevention
- Never cast strategy strings with `as`
- Pin library version so types match runtime
- Let the compiler enforce exhaustiveness instead of runtime
When it happens
Trigger: Calling launch with renderer strategy string not covered by the switch (e.g. 'tmux-popup' vs 'tmux-session', custom string cast to the strategy type, or a newly added union member without a matching case).
Common situations: Version skew: caller compiled against a newer type that added a strategy the installed runtime doesn't handle; typos in config strings; `as any`/`as Strategy` casts bypassing compile-time exhaustiveness.
Related errors
- Unknown team phase: ${_exhaustive}
- missing_prompt
- Missing goal workflow objective.
- Question UI session ${target} disappeared immediately after
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/d58570b6b1484054.
Report an issue: GitHub.