Yeachan-Heo/oh-my-codex · error · Error

shutdown_detached_session_HUD_pane_authorization_unavailable

Error message

shutdown_detached_session_HUD_pane_authorization_unavailable:${effectiveHudPaneId}

What it means

In detached-session topology, the HUD pane authorization fallback path requires: a persisted HUD pane id equal to the effective one, a known tmux owner id, and a valid persisted PID. This error fires when any of those preconditions is missing.

Source

Thrown at src/team/runtime.ts:5236

      : null;
    const persistedLeaderPaneId = typeof leaderPaneId === 'string' && /^%[0-9]+$/.test(leaderPaneId)
      ? leaderPaneId
      : null;
    if (persistedHudPaneId && effectiveHudPaneId === persistedHudPaneId && (typeof hudPanePid !== 'number' || !Number.isSafeInteger(hudPanePid) || hudPanePid <= 0)) {
      const scope = sharedSessionTopology ? 'shared_session' : 'detached_session';
      throw new Error(`shutdown_${scope}_HUD_pane_pid_missing:${effectiveHudPaneId}`);
    }
    const frozenHudAuthorization = effectiveHudPaneId
      ? (sharedSessionTopology
        ? freezeSharedPaneAuthorization(
          effectiveHudPaneId,
          'HUD pane',
          effectiveHudPaneId === persistedHudPaneId ? hudPanePid : undefined,
        )
        : (() => {
          if (!persistedHudPaneId || effectiveHudPaneId !== persistedHudPaneId || !tmuxPaneOwnerId
            || typeof hudPanePid !== 'number' || !Number.isSafeInteger(hudPanePid) || hudPanePid <= 0) {
            throw new Error(`shutdown_detached_session_HUD_pane_authorization_unavailable:${effectiveHudPaneId}`);
          }
          const proof = readExactPaneProofSync(effectiveHudPaneId);
          if (proof.status !== 'live' || proof.pid !== hudPanePid) {
            throw new Error(`shutdown_detached_session_HUD_pane_identity_changed:${effectiveHudPaneId}`);
          }
          const owner = readPaneTeamOwnerTagResult(proof.paneId);
          if (owner.status !== 'value' || owner.value !== tmuxPaneOwnerId) {
            throw new Error(`shutdown_detached_session_HUD_pane_owner_changed:${effectiveHudPaneId}`);
          }
          const finalProof = readExactPaneProofSync(proof.paneId);
          if (finalProof.status !== 'live' || finalProof.pid !== hudPanePid) {
            throw new Error(`shutdown_detached_session_HUD_pane_identity_changed:${effectiveHudPaneId}`);
          }
          return { paneId: finalProof.paneId, pid: hudPanePid, owner: tmuxPaneOwnerId };
        })())
      : null;
    if (persistedLeaderPaneId && trustedHudRestoreLeaderPaneId === persistedLeaderPaneId && (typeof leaderPanePid !== 'number' || !Number.isSafeInteger(leaderPanePid) || leaderPanePid <= 0)) {
      throw new Error(`shutdown_shared_session_restore_leader_pane_pid_missing:${trustedHudRestoreLeaderPaneId}`);

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. If the HUD pane legitimately moved, clear the stale persisted hud_pane_id/hud_pane_pid so authorization is rebuilt
  2. Ensure tmuxPaneOwnerId is available (run within the tmux session the tool created)
  3. Recreate the detached session from scratch to repopulate config
Defensive patterns

Strategy: validation

Validate before calling

if (effectiveHudPaneId !== persistedHudPaneId || !isValidPid(hudPanePid) || !tmuxPaneOwnerId) { /* skip pin or refresh config */ }

Prevention

When it happens

Trigger: Detached (non-shared) topology and (!persistedHudPaneId || effectiveHudPaneId !== persistedHudPaneId || !tmuxPaneOwnerId || invalid hudPanePid) inside the HUD authorization IIFE.

Common situations: Detached session where the HUD pane was recreated (effective id differs from persisted); owner id never captured for detached runs; config partially populated.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/17099eb59066a760. Report an issue: GitHub.