Yeachan-Heo/oh-my-codex · error

Failed to create tmux question renderer container.

Error message

Failed to create tmux question renderer container.

What it means

launchQuestionPane runs a tmux command (e.g. split-window) to create the pane that renders the question UI, then parses a pane id from tmux's output. If parsePaneIdFromTmuxOutput cannot extract a %{pane_id}, the launch aborts because subsequent keystrokes/targeting have nothing to address. Usually the tmux command itself failed or emitted an error message instead of a pane id.

Source

Thrown at src/question/renderer.ts:319

  return undefined;
}

function launchQuestionPane(
  execTmux: ExecTmuxSync,
  sleepImpl: SleepSync,
  args: string[],
  launchedAt: string,
  returnTarget: string | undefined,
): {
  renderer: 'tmux-pane';
  target: string;
  launched_at: string;
  return_target?: string;
  return_transport?: 'tmux-send-keys';
} {
  const rawPane = execTmux(args);
  const paneId = parsePaneIdFromTmuxOutput(rawPane);
  if (!paneId) throw new Error('Failed to create tmux question renderer container.');
  sleepImpl(QUESTION_RENDERER_PANE_SETTLE_MS);
  if (!isLaunchedQuestionPaneAlive(paneId, execTmux)) {
    throw new Error(`Question UI pane ${paneId} disappeared immediately after launch.`);
  }
  return {
    renderer: 'tmux-pane',
    target: paneId,
    launched_at: launchedAt,
    ...(returnTarget ? { return_target: returnTarget, return_transport: 'tmux-send-keys' as const } : {}),
  };
}

function resolveQuestionUiProcessArgs(
  recordPath: string,
  options: {
    cwd: string;
    env?: NodeJS.ProcessEnv;
  },

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Verify a tmux session exists and is attached: run `tmux ls` and reattach with `tmux attach`.
  2. Run the omx question command from inside an attached tmux pane.
  3. If on Windows, confirm the psmux/wintmux shim is installed and returns standard tmux output.
  4. Check that tmux version output formats match what the parser expects (run the underlying tmux command manually to inspect output).
Defensive patterns

Strategy: fallback

Validate before calling

import { execFileSync } from 'node:child_process';
function tmuxWorks(): boolean {
  try { execFileSync('tmux', ['-V'], { encoding: 'utf-8' }); return true; } catch { return false; }
}

Try / catch

try { launchQuestionRenderer(opts); } catch (e) { if (e instanceof Error && /Failed to create tmux question renderer container/.test(e.message)) { /* fall back to non-interactive/stdout question mode */ } else throw e; }

Prevention

When it happens

Trigger: tmux display-message -p '#{pane_id}' (or split-window output) returning empty or an error string; tmux server not running so no session exists to split into; running outside tmux so the target session is unresolvable; tmux too old/new output format not matching the parser.

Common situations: CI or non-interactive shells with no tmux session; TMUX env var stale after detaching; psmux/wintmux compatibility shim printing extra output on Windows; tmux binary present but server dead.

Related errors


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