{"record":{"id":"ca426eb9dba619e8","repo":"Yeachan-Heo/oh-my-codex","slug":"failed-to-create-psmux-question-renderer-shell-pan","errorCode":null,"errorMessage":"Failed to create psmux question renderer shell pane.","messagePattern":"Failed to create psmux question renderer shell pane\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/question/renderer.ts","lineNumber":476,"sourceCode":"    cwd: string;\n    env?: NodeJS.ProcessEnv;\n    sessionId?: string;\n    returnTarget?: string;\n    launchedAt: string;\n  },\n): QuestionRendererState {\n  const rawPane = execTmux([\n    'new-window',\n    '-n',\n    'OMX Question',\n    '-P',\n    '-F',\n    '#{pane_id}',\n    '-c',\n    options.cwd,\n  ]);\n  const paneId = parsePaneIdFromTmuxOutput(rawPane);\n  if (!paneId) throw new Error('Failed to create psmux question renderer shell pane.');\n  sleepImpl(QUESTION_RENDERER_PANE_SETTLE_MS);\n  if (!isLaunchedQuestionPaneAlive(paneId, execTmux)) {\n    throw new Error(`Question UI psmux pane ${paneId} disappeared immediately after launch.`);\n  }\n\n  const command = buildWindowsPsmuxQuestionUiCommand(recordPath, options);\n  for (const argv of buildSendPaneArgvs(paneId, command, false)) {\n    execTmux(argv);\n  }\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  };","sourceCodeStart":458,"sourceCodeEnd":494,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/question/renderer.ts#L458-L494","documentation":"Windows variant of pane creation: launchWindowsPsmuxShellQuestionPane runs the psmux (Windows tmux shim) command with '-F #{pane_id}' and -c cwd, then parses the pane id. If parsePaneIdFromTmuxOutput yields nothing, the psmux shell pane could not be created and the launch aborts before sending the question UI command.","triggerScenarios":"psmux not installed/misbehaving on Windows; the psmux command erroring (bad session, invalid cwd path with Windows separators); psmux output format differing from tmux's so the pane-id regex misses it.","commonSituations":"Windows environments where wintmux/psmux shim is missing, outdated, or its output includes extra lines; running from a shell without the shim on PATH; cwd pointing to a path psmux cannot -c into.","solutions":["Confirm psmux is installed and on PATH; run `psmux -V` (or the shim's version command).","Reproduce the exact psmux command shown in logs with '-F #{pane_id}' to inspect its output/error.","Update or align the psmux shim version so output matches the tmux pane-id format.","Run from inside an active psmux session rather than spawning a detached one."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import { execFileSync } from 'node:child_process';\nfunction psmuxWorks(): boolean {\n  try { execFileSync('psmux', ['-V'], { encoding: 'utf-8' }); return true; } catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"try { launchQuestionRenderer(opts); } catch (e) { if (e instanceof Error && /psmux question renderer shell pane/.test(e.message)) { /* fall back to non-interactive question mode on Windows */ } else throw e; }","preventionTips":["Install and verify the psmux shim on Windows hosts.","Run from inside an existing psmux session.","Keep the shim version aligned with the tmux output format the parser expects."],"tags":["windows","psmux","tmux","renderer"],"backgroundTag":"tmux-pane-creation-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}