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

shutdown_${scope}_${kind.replaceAll(' ', '_')}_owner_unavail

Error message

shutdown_${scope}_${kind.replaceAll(' ', '_')}_owner_unavailable:${authorization.paneId}:${owner.error}

What it means

Thrown by assertSharedPaneAuthorizationContinuous when re-reading a pane's team owner tag mid-shutdown errors out. The shutdown flow deliberately aborts rather than continue with unverifiable ownership.

Source

Thrown at src/team/runtime.ts:5209

        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 };
    };
    const assertSharedPaneAuthorizationContinuous = (
      authorization: FrozenSharedPaneAuthorization,
      kind: 'HUD pane' | 'restore leader pane',
    ): void => {
      const scope = sharedSessionTopology ? 'shared_session' : 'detached_session';
      const proof = readExactPaneProofSync(authorization.paneId);
      if (proof.status !== 'live' || proof.pid !== authorization.pid) {
        throw new Error(`shutdown_${scope}_${kind.replaceAll(' ', '_')}_identity_changed:${authorization.paneId}`);
      }
      const owner = readPaneTeamOwnerTagResult(authorization.paneId);
      if (owner.status === 'error') {
        throw new Error(`shutdown_${scope}_${kind.replaceAll(' ', '_')}_owner_unavailable:${authorization.paneId}:${owner.error}`);
      }
      const currentOwner = owner.status === 'value' ? owner.value : null;
      if (currentOwner !== authorization.owner) {
        throw new Error(`shutdown_${scope}_${kind.replaceAll(' ', '_')}_owner_changed:${authorization.paneId}`);
      }
    };
    const persistedHudPaneId = typeof hudPaneId === 'string' && /^%[0-9]+$/.test(hudPaneId)
      ? hudPaneId
      : 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

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Check the appended error string; retry shutdown after confirming tmux is healthy (tmux info)
  2. If the tmux server is gone, the session is already down — clear persisted state and finish cleanup manually
  3. Pin a stable tmux socket (set -g default-terminal / Sockets) if tmpdir cleanup races are involved
Defensive patterns

Strategy: retry

Try / catch

catch (e) { if (/owner_unavailable:/.test(e.message) && retries < 3) return retry(); throw e; }

Prevention

When it happens

Trigger: readPaneTeamOwnerTagResult returns status 'error' during a continuity check — tmux command failure, socket error, or server termination between teardown phases.

Common situations: tmux server exiting during shutdown; transient EPIPE/ENOENT on the tmux socket; environment variable TMUX unset mid-process.

Related errors


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