{"record":{"id":"59882d359b34225d","repo":"Yeachan-Heo/oh-my-codex","slug":"question-ui-psmux-pane-paneid-disappeared-immed","errorCode":null,"errorMessage":"Question UI psmux pane ${paneId} disappeared immediately after launch.","messagePattern":"Question UI psmux pane (.+?) disappeared immediately after launch\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/question/renderer.ts","lineNumber":479,"sourceCode":"    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  };\n}\n\nfunction defaultSpawnDetachedRenderer(command: string, args: string[], options: SpawnOptions): Pick<ChildProcess, 'pid' | 'unref'> {","sourceCodeStart":461,"sourceCodeEnd":497,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/question/renderer.ts#L461-L497","documentation":"Windows/psmux counterpart of the 'disappeared immediately' check: after creating the shell pane and waiting QUESTION_RENDERER_PANE_SETTLE_MS, isLaunchedQuestionPaneAlive reports it is gone. The psmux pane's shell or the command sent into it exited instantly, so the renderer cannot proceed.","triggerScenarios":"The psmux pane's shell exiting immediately (bad COMSPEC, shell not found, psmux closing empty panes); the follow-up question UI command (buildWindowsPsmuxQuestionUiCommand) failing to start because the OMX entry path is wrong on Windows; races with pane supersede.","commonSituations":"Windows CI/headless hosts where the default shell is unavailable; psmux configured with remain-on-exit off and a crashing command; path/quoting issues in the generated Windows command line.","solutions":["Run the generated Windows question UI command manually in a psmux pane to see the immediate failure.","Verify the OMX CLI entry path and node executable work under Windows shells (quoting, backslashes).","Ensure the psmux default shell exists (check COMSPEC/SHELL settings) and panes are not auto-closed."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// manually test the generated command in a psmux pane:\n// psmux split-window; then run buildWindowsPsmuxQuestionUiCommand output","typeGuard":null,"tryCatchPattern":"try { launchQuestionRenderer(opts); } catch (e) { if (e instanceof Error && /psmux pane .* disappeared/.test(e.message)) { await delay(500); return launchQuestionRenderer(opts); } throw e; }","preventionTips":["Confirm the Windows shell (COMSPEC) is available to psmux panes.","Test the question UI command standalone before launching.","Quote Windows paths correctly in generated commands."],"tags":["windows","psmux","process-exit","renderer"],"backgroundTag":"child-process-exited-immediately","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}