{"record":{"id":"9a227a1e3650fa02","repo":"Yeachan-Heo/oh-my-codex","slug":"omx-question-cannot-open-a-visible-renderer-becaus","errorCode":null,"errorMessage":"omx question cannot open a visible renderer because this process is outside an attached tmux pane and has no explicit tmux return bridge. Codex App/outside-tmux sessions need an attached tmux OMX CLI session or OMX_QUESTION_RETURN_PANE bridge. Run omx question from inside tmux.","messagePattern":"omx question cannot open a visible renderer because this process is outside an attached tmux pane and has no explicit tmux return bridge\\. Codex App/outside-tmux sessions need an attached tmux OMX CLI session or OMX_QUESTION_RETURN_PANE bridge\\. Run omx question from inside tmux\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/question/renderer.ts","lineNumber":830,"sourceCode":"    sleepSync?: SleepSync;\n    spawnDetachedRenderer?: SpawnDetachedRenderer;\n  } = {},\n): QuestionRendererState {\n  const strategy = deps.strategy ?? resolveQuestionRendererStrategy(options.env ?? process.env, undefined, {\n    cwd: options.cwd,\n    sessionId: options.sessionId,\n    platform: options.platform,\n    stdinIsTTY: options.stdinIsTTY,\n    stdoutIsTTY: options.stdoutIsTTY,\n  });\n  const execTmux = deps.execTmux ?? defaultExecTmux;\n  const sleepImpl = deps.sleepSync ?? sleepSync;\n  const spawnDetachedRenderer = deps.spawnDetachedRenderer ?? defaultSpawnDetachedRenderer;\n  const launchedAt = options.nowIso ?? new Date().toISOString();\n  const env = options.env ?? process.env;\n\n  if (strategy === 'unsupported') {\n    throw new Error(\n      'omx question cannot open a visible renderer because this process is outside an attached tmux pane and has no explicit tmux return bridge. Codex App/outside-tmux sessions need an attached tmux OMX CLI session or OMX_QUESTION_RETURN_PANE bridge. Run omx question from inside tmux.',\n    );\n  }\n\n  const returnTarget = resolveReturnTarget({\n    cwd: options.cwd,\n    env,\n    sessionId: options.sessionId,\n  });\n  const commandArgs = buildQuestionUiTmuxArgs(options.recordPath, {\n    cwd: options.cwd,\n    env: options.env,\n    sessionId: options.sessionId,\n    returnTarget,\n    underCmux: isRunningUnderCmux(env),\n  });\n\n  if (strategy === 'windows-psmux-shell-pane') {","sourceCodeStart":812,"sourceCodeEnd":848,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/question/renderer.ts#L812-L848","documentation":"launchQuestionRenderer chooses a strategy (inside-tmux, bridge via OMX_QUESTION_RETURN_PANE, etc.); when it computes 'unsupported' it throws this guidance message. It means the process is not inside an attached tmux pane AND no explicit return bridge env var is set, so there is no way to show the interactive UI and return focus afterwards — typical for Codex App or other non-tmux hosts.","triggerScenarios":"Running omx question from a plain terminal (no TMUX env), from an IDE/Codex App integration, or a headless process, without setting the OMX_QUESTION_RETURN_PANE environment variable to an existing tmux pane id.","commonSituations":"Codex App / out-of-tmux sessions; CI jobs; users who detached from tmux but kept stale TMUX vars partially set.","solutions":["Run omx from inside an attached tmux session (tmux attach, then run omx question).","Alternatively, set OMX_QUESTION_RETURN_PANE to a live tmux pane id (from `tmux display-message -p '#{pane_id}'`) to provide an explicit bridge.","If headless/CI, use a non-interactive question mode instead of the tmux UI if available."],"exampleFix":"# before\nomx question   # run from a plain (non-tmux) terminal\n\n# after\ntmux\nomx question\n# or: OMX_QUESTION_RETURN_PANE=%42 omx question","handlingStrategy":"try-catch","validationCode":"const insideTmux = !!process.env.TMUX;\nconst hasBridge = !!process.env.OMX_QUESTION_RETURN_PANE;\nif (!insideTmux && !hasBridge) { /* use non-interactive mode instead of launchQuestionRenderer */ }","typeGuard":null,"tryCatchPattern":"try { launchQuestionRenderer(opts); } catch (e) { if (e instanceof Error && /outside an attached tmux pane/.test(e.message)) { /* prompt via stdout / non-interactive path */ } else throw e; }","preventionTips":["Run omx from inside an attached tmux session by default.","For Codex App hosts, set OMX_QUESTION_RETURN_PANE to a live pane in an attached session.","Detect headless environments up front and select a non-interactive question strategy."],"tags":["tmux","environment","codex-app","renderer"],"backgroundTag":"tmux-session-required","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}