{"record":{"id":"4772d29ed3336f13","repo":"Yeachan-Heo/oh-my-codex","slug":"shutdown-detached-session-hud-pane-identity-change","errorCode":null,"errorMessage":"shutdown_detached_session_HUD_pane_identity_changed:${effectiveHudPaneId}","messagePattern":"shutdown_detached_session_HUD_pane_identity_changed:(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/runtime.ts","lineNumber":5240,"sourceCode":"    if (persistedHudPaneId && effectiveHudPaneId === persistedHudPaneId && (typeof hudPanePid !== 'number' || !Number.isSafeInteger(hudPanePid) || hudPanePid <= 0)) {\n      const scope = sharedSessionTopology ? 'shared_session' : 'detached_session';\n      throw new Error(`shutdown_${scope}_HUD_pane_pid_missing:${effectiveHudPaneId}`);\n    }\n    const frozenHudAuthorization = effectiveHudPaneId\n      ? (sharedSessionTopology\n        ? freezeSharedPaneAuthorization(\n          effectiveHudPaneId,\n          'HUD pane',\n          effectiveHudPaneId === persistedHudPaneId ? hudPanePid : undefined,\n        )\n        : (() => {\n          if (!persistedHudPaneId || effectiveHudPaneId !== persistedHudPaneId || !tmuxPaneOwnerId\n            || typeof hudPanePid !== 'number' || !Number.isSafeInteger(hudPanePid) || hudPanePid <= 0) {\n            throw new Error(`shutdown_detached_session_HUD_pane_authorization_unavailable:${effectiveHudPaneId}`);\n          }\n          const proof = readExactPaneProofSync(effectiveHudPaneId);\n          if (proof.status !== 'live' || proof.pid !== hudPanePid) {\n            throw new Error(`shutdown_detached_session_HUD_pane_identity_changed:${effectiveHudPaneId}`);\n          }\n          const owner = readPaneTeamOwnerTagResult(proof.paneId);\n          if (owner.status !== 'value' || owner.value !== tmuxPaneOwnerId) {\n            throw new Error(`shutdown_detached_session_HUD_pane_owner_changed:${effectiveHudPaneId}`);\n          }\n          const finalProof = readExactPaneProofSync(proof.paneId);\n          if (finalProof.status !== 'live' || finalProof.pid !== hudPanePid) {\n            throw new Error(`shutdown_detached_session_HUD_pane_identity_changed:${effectiveHudPaneId}`);\n          }\n          return { paneId: finalProof.paneId, pid: hudPanePid, owner: tmuxPaneOwnerId };\n        })())\n      : null;\n    if (persistedLeaderPaneId && trustedHudRestoreLeaderPaneId === persistedLeaderPaneId && (typeof leaderPanePid !== 'number' || !Number.isSafeInteger(leaderPanePid) || leaderPanePid <= 0)) {\n      throw new Error(`shutdown_shared_session_restore_leader_pane_pid_missing:${trustedHudRestoreLeaderPaneId}`);\n    }\n    const frozenRestoreLeaderAuthorization = sharedSessionTopology && trustedHudRestoreLeaderPaneId\n      ? freezeSharedPaneAuthorization(\n        trustedHudRestoreLeaderPaneId,","sourceCodeStart":5222,"sourceCodeEnd":5258,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/runtime.ts#L5222-L5258","documentation":"Detached-session HUD authorization requires the live pane proof PID to equal the persisted hudPanePid. This error means the pane id resolves to a live pane whose PID differs — the original HUD process is gone.","triggerScenarios":"Detached topology, first readExactPaneProofSync(effectiveHudPaneId) returns live but proof.pid !== hudPanePid.","commonSituations":"tmux pane respawn/reuse under the same %id; stale config from a previous detached run; the HUD process crashed and tmux respawned a shell in the pane.","solutions":["Clear persisted hud_pane_id/hud_pane_pid and re-run shutdown","Manually kill the reused pane if it is a leftover shell","Prevent respawn hooks from reusing HUD panes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const p = readExactPaneProofSync(hudPaneId); if (p.status !== 'live' || p.pid !== hudPanePid) clearPin();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Disable respawn-pane automation on HUD panes","Clear stale pins on startup"],"tags":["tmux","pid-mismatch","detached-session"],"backgroundTag":"stale-resource-id","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}