{"record":{"id":"d58570b6b1484054","repo":"Yeachan-Heo/oh-my-codex","slug":"unsupported-omx-question-renderer-strategy-exha","errorCode":null,"errorMessage":"Unsupported omx question renderer strategy: ${exhaustiveStrategy}","messagePattern":"Unsupported omx question renderer strategy: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/question/renderer.ts","lineNumber":1022,"sourceCode":"      throw new Error(`Question UI session ${target} disappeared immediately after launch.`);\n    }\n    return {\n      renderer: 'tmux-session',\n      target,\n      launched_at: launchedAt,\n    };\n  }\n\n  if (strategy === 'test-noop') {\n    return {\n      renderer: 'tmux-session',\n      target: 'test-noop-renderer',\n      launched_at: launchedAt,\n    };\n  }\n\n  const exhaustiveStrategy: never = strategy;\n  throw new Error(`Unsupported omx question renderer strategy: ${exhaustiveStrategy}`);\n}\n","sourceCodeStart":1004,"sourceCodeEnd":1024,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/question/renderer.ts#L1004-L1024","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before\nlaunch({ strategy: 'tmux-popup' as QuestionRendererStrategy });\n// after\nconst strategy: QuestionRendererStrategy = 'tmux-session'; // compile-time checked\nlaunch({ strategy });","handlingStrategy":"type-guard","validationCode":"const KNOWN = new Set(['tmux-session','noop' /* ...per version*/]);\nif (!KNOWN.has(strategy)) throw new Error(`unknown strategy ${strategy}`);","typeGuard":"function isQuestionRendererStrategy(s: unknown): s is QuestionRendererStrategy {\n  return typeof s === 'string' && ['tmux-session','noop'].includes(s); // keep in sync with the union\n}","tryCatchPattern":"try { launch({ strategy }); } catch (e) { if (/Unsupported omx question renderer strategy/.test((e as Error).message)) { /* fall back to a known strategy */ } throw e; }","preventionTips":["Never cast strategy strings with `as`","Pin library version so types match runtime","Let the compiler enforce exhaustiveness instead of runtime"],"tags":["exhaustive-switch","typescript","question-renderer"],"backgroundTag":"unhandled-enum-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}