{"record":{"id":"dcf2c737f039ae58","repo":"Yeachan-Heo/oh-my-codex","slug":"shutdown-shared-session-kind-replaceall-dcf2c7","errorCode":null,"errorMessage":"shutdown_shared_session_${kind.replaceAll(' ', '_')}_owner_changed:${paneId}","messagePattern":"shutdown_shared_session_(.+?)_owner_changed:(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/runtime.ts","lineNumber":5194,"sourceCode":"    ): FrozenSharedPaneAuthorization => {\n      const proof = readExactPaneProofSync(paneId);\n      if (proof.status !== 'live') {\n        throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_proof_unavailable:${paneId}`);\n      }\n      if (typeof expectedPid === 'number') {\n        if (!Number.isSafeInteger(expectedPid) || expectedPid <= 0) {\n          throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_pid_missing:${paneId}`);\n        }\n        if (proof.pid !== expectedPid) {\n          throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_identity_changed:${paneId}`);\n        }\n      }\n      const owner = readPaneTeamOwnerTagResult(paneId);\n      if (owner.status === 'error') {\n        throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_owner_unavailable:${paneId}:${owner.error}`);\n      }\n      if (owner.status !== 'value' || !tmuxPaneOwnerId || owner.value !== tmuxPaneOwnerId) {\n        throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_owner_changed:${paneId}`);\n      }\n      return { paneId, pid: proof.pid, owner: owner.value };\n    };\n    const assertSharedPaneAuthorizationContinuous = (\n      authorization: FrozenSharedPaneAuthorization,\n      kind: 'HUD pane' | 'restore leader pane',\n    ): void => {\n      const scope = sharedSessionTopology ? 'shared_session' : 'detached_session';\n      const proof = readExactPaneProofSync(authorization.paneId);\n      if (proof.status !== 'live' || proof.pid !== authorization.pid) {\n        throw new Error(`shutdown_${scope}_${kind.replaceAll(' ', '_')}_identity_changed:${authorization.paneId}`);\n      }\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) {","sourceCodeStart":5176,"sourceCodeEnd":5212,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/runtime.ts#L5176-L5212","documentation":"Thrown during shared-session shutdown when a pane's team owner tag does not match the expected owner (or is missing/unset). This prevents shutting down panes that belong to a different team or are unowned.","triggerScenarios":"owner.status !== 'value', or tmuxPaneOwnerId is falsy, or owner.value !== tmuxPaneOwnerId — pane tag was cleared, retagged to another team, or the caller has no owner id.","commonSituations":"Pane was adopted/retagged by another concurrent team session; owner option manually deleted; racing shutdowns from two clients.","solutions":["Ensure only one team client performs shutdown for a given session/owner","Re-tag or remove the foreign pane, then rerun shutdown","Inspect tmux show-options -p -t <pane> @<owner-tag> to see current ownership"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const r = readPaneTeamOwnerTagResult(paneId); if (r.status !== 'value' || r.value !== tmuxPaneOwnerId) skip();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["One owner per session; serialize shutdowns","Never manually unset owner options on team panes"],"tags":["tmux","ownership-mismatch","concurrency","shutdown"],"backgroundTag":"resource-ownership-mismatch","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}