Yeachan-Heo/oh-my-codex · error

Question UI psmux pane ${paneId} disappeared immediately aft

Error message

Question UI psmux pane ${paneId} disappeared immediately after launch.

What it means

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.

Source

Thrown at src/question/renderer.ts:479

    returnTarget?: string;
    launchedAt: string;
  },
): QuestionRendererState {
  const rawPane = execTmux([
    'new-window',
    '-n',
    'OMX Question',
    '-P',
    '-F',
    '#{pane_id}',
    '-c',
    options.cwd,
  ]);
  const paneId = parsePaneIdFromTmuxOutput(rawPane);
  if (!paneId) throw new Error('Failed to create psmux question renderer shell pane.');
  sleepImpl(QUESTION_RENDERER_PANE_SETTLE_MS);
  if (!isLaunchedQuestionPaneAlive(paneId, execTmux)) {
    throw new Error(`Question UI psmux pane ${paneId} disappeared immediately after launch.`);
  }

  const command = buildWindowsPsmuxQuestionUiCommand(recordPath, options);
  for (const argv of buildSendPaneArgvs(paneId, command, false)) {
    execTmux(argv);
  }
  sleepImpl(QUESTION_TEXT_SETTLE_MS);
  execTmux(['send-keys', '-t', paneId, 'C-m']);

  return {
    renderer: 'tmux-pane',
    target: paneId,
    launched_at: options.launchedAt,
    ...(options.returnTarget ? { return_target: options.returnTarget, return_transport: 'tmux-send-keys' as const } : {}),
  };
}

function defaultSpawnDetachedRenderer(command: string, args: string[], options: SpawnOptions): Pick<ChildProcess, 'pid' | 'unref'> {

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Run the generated Windows question UI command manually in a psmux pane to see the immediate failure.
  2. Verify the OMX CLI entry path and node executable work under Windows shells (quoting, backslashes).
  3. Ensure the psmux default shell exists (check COMSPEC/SHELL settings) and panes are not auto-closed.
Defensive patterns

Strategy: retry

Validate before calling

// manually test the generated command in a psmux pane:
// psmux split-window; then run buildWindowsPsmuxQuestionUiCommand output

Try / catch

try { launchQuestionRenderer(opts); } catch (e) { if (e instanceof Error && /psmux pane .* disappeared/.test(e.message)) { await delay(500); return launchQuestionRenderer(opts); } throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/59882d359b34225d. Report an issue: GitHub.