{"record":{"id":"112224b37c7df6b2","repo":"Yeachan-Heo/oh-my-codex","slug":"shutdown-scope-hud-pane-pid-missing-effective","errorCode":null,"errorMessage":"shutdown_${scope}_HUD_pane_pid_missing:${effectiveHudPaneId}","messagePattern":"shutdown_(.+?)_HUD_pane_pid_missing:(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/runtime.ts","lineNumber":5224,"sourceCode":"      }\n      const owner = readPaneTeamOwnerTagResult(authorization.paneId);\n      if (owner.status === 'error') {\n        throw new Error(`shutdown_${scope}_${kind.replaceAll(' ', '_')}_owner_unavailable:${authorization.paneId}:${owner.error}`);\n      }\n      const currentOwner = owner.status === 'value' ? owner.value : null;\n      if (currentOwner !== authorization.owner) {\n        throw new Error(`shutdown_${scope}_${kind.replaceAll(' ', '_')}_owner_changed:${authorization.paneId}`);\n      }\n    };\n    const persistedHudPaneId = typeof hudPaneId === 'string' && /^%[0-9]+$/.test(hudPaneId)\n      ? hudPaneId\n      : null;\n    const persistedLeaderPaneId = typeof leaderPaneId === 'string' && /^%[0-9]+$/.test(leaderPaneId)\n      ? leaderPaneId\n      : null;\n    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);","sourceCodeStart":5206,"sourceCodeEnd":5242,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/runtime.ts#L5206-L5242","documentation":"Thrown when the persisted HUD pane id matches the effective HUD pane id but the persisted HUD pane PID is missing or invalid. Shutdown refuses to proceed without a verifiable PID for the pinned HUD pane.","triggerScenarios":"effectiveHudPaneId === persistedHudPaneId while hudPanePid is not a number, not a safe integer, or <= 0 at the top of the shutdown flow.","commonSituations":"Config migrated or hand-edited losing hud_pane_pid; older version wrote null; partial config write after a crash.","solutions":["Restore or recompute hud_pane_pid in the persisted config (or clear hud_pane_id so the pin is dropped)","Regenerate the team config by restarting the team session cleanly","Add a config sanitization step on startup"],"exampleFix":"// before\nshutdown({ hudPaneId: cfg.hud_pane_id, hudPanePid: cfg.hud_pane_pid });\n// after\nconst pin = cfg.hud_pane_pid && Number.isSafeInteger(cfg.hud_pane_pid) && cfg.hud_pane_pid > 0;\nshutdown({ hudPaneId: pin ? cfg.hud_pane_id : undefined, hudPanePid: pin ? cfg.hud_pane_pid : undefined });","handlingStrategy":"validation","validationCode":"const pin = Number.isSafeInteger(hudPanePid) && hudPanePid > 0; call(pin ? {hudPaneId, hudPanePid} : {});","typeGuard":"const isValidPanePid = (p: unknown): p is number => typeof p === 'number' && Number.isSafeInteger(p) && p > 0;","tryCatchPattern":null,"preventionTips":["Sanitize persisted pid fields on load","Clear pane pins after crashes"],"tags":["tmux","config-validation","pid","shutdown"],"backgroundTag":"invalid-numeric-config-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}