diegosouzapw/OmniRoute · error · Error

ChatGPT Web (Codex) supervisor is already owned by process $

Error message

ChatGPT Web (Codex) supervisor is already owned by process ${ownerPid}

What it means

Error "ChatGPT Web (Codex) supervisor is already owned by process ${ownerPid}" thrown in diegosouzapw/OmniRoute.

Source

Thrown at open-sse/executors/chatgpt-web-codex/tunnelClient.ts:166

        closeSync(fd);
      }
      ownsSupervisorLease = true;
      return;
    } catch (error) {
      if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error;
      let ownerPid = 0;
      try {
        const lease = JSON.parse(readFileSync(path, "utf8")) as Partial<SupervisorLease>;
        ownerPid = Number(lease.pid) || 0;
      } catch {
        ownerPid = 0;
      }
      if (ownerPid === process.pid) {
        ownsSupervisorLease = true;
        return;
      }
      if (processIsAlive(ownerPid)) {
        throw new Error(`ChatGPT Web (Codex) supervisor is already owned by process ${ownerPid}`);
      }
      rmSync(path, { force: true });
    }
  }
  throw new Error("ChatGPT Web (Codex) supervisor lease could not be acquired");
}

export function tunnelSupervisorLeaseStatus(): {
  ownedByCurrentProcess: boolean;
  conflict: boolean;
  ownerPid?: number;
} {
  const path = tunnelClientPaths().supervisorLease;
  if (!existsSync(path)) return { ownedByCurrentProcess: false, conflict: false };
  try {
    const lease = JSON.parse(readFileSync(path, "utf8")) as Partial<SupervisorLease>;
    const ownerPid = Number(lease.pid) || undefined;
    return {

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at open-sse/executors/chatgpt-web-codex/tunnelClient.ts:166 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/006d3398826b0c09. Report an issue: GitHub.