{"record":{"id":"23add392549b15bd","repo":"Yeachan-Heo/oh-my-codex","slug":"tmux-is-unavailable-omx-question-requires-tmux-fo","errorCode":null,"errorMessage":"tmux is unavailable; omx question requires tmux for OMX-owned question UI rendering.","messagePattern":"tmux is unavailable; omx question requires tmux for OMX-owned question UI rendering\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/question/renderer.ts","lineNumber":503,"sourceCode":"  }\n  sleepImpl(QUESTION_TEXT_SETTLE_MS);\n  execTmux(['send-keys', '-t', paneId, 'C-m']);\n\n  return {\n    renderer: 'tmux-pane',\n    target: paneId,\n    launched_at: options.launchedAt,\n    ...(options.returnTarget ? { return_target: options.returnTarget, return_transport: 'tmux-send-keys' as const } : {}),\n  };\n}\n\nfunction defaultSpawnDetachedRenderer(command: string, args: string[], options: SpawnOptions): Pick<ChildProcess, 'pid' | 'unref'> {\n  return spawn(command, args, options);\n}\n\nfunction defaultExecTmux(args: string[]): string {\n  const tmux = resolveTmuxBinaryForPlatform();\n  if (!tmux) throw new Error('tmux is unavailable; omx question requires tmux for OMX-owned question UI rendering.');\n  return execFileSync(tmux, args, {\n    encoding: 'utf-8',\n    ...(process.platform === 'win32' ? { windowsHide: true } : {}),\n  });\n}\n\nfunction readJsonFileIfExists(path: string): Record<string, unknown> | null {\n  if (!existsSync(path)) return null;\n  try {\n    const parsed = JSON.parse(readFileSync(path, 'utf-8')) as unknown;\n    return parsed && typeof parsed === 'object' && !Array.isArray(parsed)\n      ? parsed as Record<string, unknown>\n      : null;\n  } catch {\n    return null;\n  }\n}\n","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/question/renderer.ts#L485-L521","documentation":"defaultExecTmux resolves the tmux binary per platform (resolveTmuxBinaryForPlatform) before every tmux invocation; when no binary can be found (tmux absent on PATH, or the Windows psmux shim missing), it throws immediately. OMX-owned question UI rendering is tmux-based, so tmux is a hard requirement, not optional.","triggerScenarios":"Calling launchQuestionRenderer (or any code path that shells out to tmux, e.g. supersedeLiveQuestionsForSession) on a machine without tmux installed; PATH stripped in the execution environment; Windows without the psmux/wintmux shim.","commonSituations":"Docker containers/CI images without tmux; SSH sessions where PATH differs; macOS/Linux minimal installs; Windows hosts missing the bundled shim.","solutions":["Install tmux (`apt-get install tmux`, `brew install tmux`) or on Windows install the psmux/wintmux shim.","Ensure tmux is on PATH for the process environment (echo process.env.PATH from your host).","Pre-check availability with resolveTmuxBinaryForPlatform or `tmux -V` before launching the question UI."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { execFileSync } from 'node:child_process';\nfunction tmuxAvailable(): boolean {\n  try { execFileSync(process.platform === 'win32' ? 'psmux' : 'tmux', ['-V']); return true; } catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"try { launchQuestionRenderer(opts); } catch (e) { if (e instanceof Error && /tmux is unavailable/.test(e.message)) { /* degrade to non-interactive question mode */ } else throw e; }","preventionTips":["Install tmux (or the Windows shim) in CI/Docker images.","PATH-check for tmux in deployment scripts.","Use headless question modes where tmux cannot be guaranteed."],"tags":["tmux","missing-dependency","environment"],"backgroundTag":"tmux-not-found","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}