{"record":{"id":"ad655796bb05e7c4","repo":"Yeachan-Heo/oh-my-codex","slug":"restored-hud-split-topology-reconciliation-failed","errorCode":null,"errorMessage":"restored_hud_split_topology_reconciliation_failed","messagePattern":"restored_hud_split_topology_reconciliation_failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/tmux-session.ts","lineNumber":3101,"sourceCode":"      '-P',\n      '-F',\n      '#{pane_id}',\n      '-c',\n      translatePathForMsys(restoreCwd.rawPath),\n      hudCmd,\n    ], true);\n    if (candidateResult.ok) {\n      hudResult = candidateResult;\n      break;\n    }\n  }\n  if (!hudResult?.ok) return null;\n\n  const paneId = parseSplitWindowPaneId(hudResult.stdout);\n  if (!paneId) {\n    const afterTopology = listPanesResult(normalizedLeaderPaneId);\n    if (afterTopology.error) {\n      throw new Error('restored_hud_split_topology_reconciliation_failed');\n    }\n    const newlyObservedPaneIds = afterTopology.panes\n      .filter((pane) => !beforeSplitPaneIds.has(pane.paneId) && pane.startCommand.includes(splitReceipt))\n      .map((pane) => pane.paneId);\n    if (newlyObservedPaneIds.length === 1) {\n      const reconciledPaneId = newlyObservedPaneIds[0]!;\n      persistRestoredHudCleanupDebtSync(cwd, {\n        schema_version: 1,\n        operation: 'restored_hud_cleanup',\n        pane_id: reconciledPaneId,\n        pane_pid: null,\n        leader_pane_id: normalizedLeaderPaneId,\n        leader_pane_pid: options.expectedLeaderPanePid ?? leaderPanePid,\n        leader_pane_owner_id: options.expectedLeaderPaneOwnerId?.trim() || null,\n        hud_owner_leader_pane_id: normalizedLeaderPaneId,\n      }, options.stateRoot);\n      const reconciledProof = readExactPaneProofSync(reconciledPaneId);\n      if (reconciledProof.status === 'unavailable') throw new ExactPaneProofUnavailableError(reconciledProof);","sourceCodeStart":3083,"sourceCodeEnd":3119,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/tmux-session.ts#L3083-L3119","documentation":"Thrown by restoreStandaloneHudPane during fallback reconciliation: the split-window -P -F '#{pane_id}' output could not be parsed (parseSplitWindowPaneId returned null), so the code re-reads the pane topology to identify the new pane by its split receipt — and that second listPanesResult call itself failed. The new HUD pane may exist, but the library can neither confirm nor record cleanup debt for it, so it throws.","triggerScenarios":"runTmux split-window succeeded but stdout had no parseable pane id, and the subsequent tmux list-panes query errored (dead server, session destroyed mid-call, malformed output).","commonSituations":"tmux server/session torn down concurrently with the restore; tmux build that ignores -P/-F output; output parsing broken by locale/format changes; flaky tmux socket under load.","solutions":["Inspect tmux state manually (tmux list-panes -a) to see if the HUD pane was actually created; if so, kill it or register cleanup manually before retrying","Retry the restore — most causes are transient topology-read races","Check tmux version supports -P -F on split-window (older builds silently omit output)","Ensure nothing else kills the session while restore runs"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { restoreStandaloneHudPane(id, cwd, opts); } catch (e) { if (e instanceof Error && e.message === 'restored_hud_split_topology_reconciliation_failed') { /* check list-panes for an orphan receipt-tagged pane; clean up; retry */ } else throw e; }","preventionTips":["Prevent concurrent session teardown during restore","Use a tmux version that emits split-window -P -F output","After this error, audit for orphaned HUD panes before retrying"],"tags":["tmux","split-window","reconciliation","race-condition"],"backgroundTag":"tmux-command-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}