Yeachan-Heo/oh-my-codex · error · Error
shutdown_shared_session_${kind.replaceAll(' ', '_')}_proof_u
Error message
shutdown_shared_session_${kind.replaceAll(' ', '_')}_proof_unavailable:${paneId} What it means
Thrown during shared-session shutdown when the code cannot read a 'live' proof for a pane (HUD pane or restore leader pane). The pane liveness proof (read via readExactPaneProofSync) either does not exist, is stale, or the pane has already died, so authorization cannot be frozen for shutdown.
Source
Thrown at src/team/runtime.ts:5179
leaderPaneId: effectiveLeaderPaneId,
hudPaneId: effectiveHudPaneId,
});
const canonicalWorkerPaneIds = [...shutdownPaneIds];
const expectedSharedWorkerPanePids = new Map<string, number>();
const prekillResolvedWorkerPaneIds = new Set<string>();
type FrozenSharedPaneAuthorization = {
paneId: string;
pid: number;
owner: string | null;
};
const freezeSharedPaneAuthorization = (
paneId: string,
kind: 'HUD pane' | 'restore leader pane',
expectedPid?: number | null,
): FrozenSharedPaneAuthorization => {
const proof = readExactPaneProofSync(paneId);
if (proof.status !== 'live') {
throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_proof_unavailable:${paneId}`);
}
if (typeof expectedPid === 'number') {
if (!Number.isSafeInteger(expectedPid) || expectedPid <= 0) {
throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_pid_missing:${paneId}`);
}
if (proof.pid !== expectedPid) {
throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_identity_changed:${paneId}`);
}
}
const owner = readPaneTeamOwnerTagResult(paneId);
if (owner.status === 'error') {
throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_owner_unavailable:${paneId}:${owner.error}`);
}
if (owner.status !== 'value' || !tmuxPaneOwnerId || owner.value !== tmuxPaneOwnerId) {
throw new Error(`shutdown_shared_session_${kind.replaceAll(' ', '_')}_owner_changed:${paneId}`);
}
return { paneId, pid: proof.pid, owner: owner.value };
};View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Verify the pane still exists with tmux list-panes -a -F '#{pane_id}' before initiating shutdown
- Clear stale persisted pane ids (hud_pane_id / leader pane id) from the config so shutdown does not target dead panes
- Retry shutdown after restarting the HUD pane or the team session
- Check readExactPaneProofSync implementation for proof-file paths and ensure the proof file was not deleted
Example fix
// before
await shutdownSharedSession({ hudPaneId: staleConfig.hud_pane_id });
// after
const livePaneIds = new Set(execSync("tmux list-panes -a -F '#{pane_id}'").toString().trim().split('\n'));
await shutdownSharedSession({ hudPaneId: livePaneIds.has(staleConfig.hud_pane_id) ? staleConfig.hud_pane_id : undefined }); Defensive patterns
Strategy: validation
Validate before calling
const paneExists = (paneId) => { try { execSync(`tmux display-message -p -t ${paneId} '#{pane_id}'`, {stdio:'pipe'}); return true; } catch { return false; }; }; Type guard
const isPaneId = (v) => typeof v === 'string' && /^%[0-9]+$/.test(v);
Try / catch
try { await shutdown(env); } catch (e) { if (String(e.message).includes('_proof_unavailable:')) { /* clear persisted pane ids and retry once */ } else throw e; } Prevention
- Validate pane ids exist in tmux before shutdown
- Clear persisted hud/leader pane ids whenever the session is recreated
- Do not delete proof files manually
When it happens
Trigger: Calling the shutdown flow for a shared session where freezeSharedPaneAuthorization runs and readExactPaneProofSync(paneId) returns a status other than 'live' — e.g. the tmux pane %id was reused, closed, or its proof file was cleared before shutdown.
Common situations: The HUD/restore-leader pane was closed manually before shutdown; tmux session was killed out-of-band; stale hud_pane_id/leaderPaneId in persisted config pointing at a dead pane; pane id reuse by tmux.
Related errors
- shutdown_${scope}_${kind.replaceAll(' ', '_')}_identity_chan
- shutdown_detached_session_HUD_pane_authorization_unavailable
- ${label} not found: ${path}
- detached ready report does not bind the inert session
- startup_cleanup_pane_pid_missing:${cleanupPane.pane_id}
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/e83c48056d7a5499.
Report an issue: GitHub.