diegosouzapw/OmniRoute · error · Error

Native Codex thread_id and turn_id are required

Error message

Native Codex thread_id and turn_id are required

What it means

Error "Native Codex thread_id and turn_id are required" thrown in diegosouzapw/OmniRoute.

Source

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

  const candidates = [
    explicit,
    process.env.CHATGPT_WEB_CODEX_CHROME_PATH,
    process.env.CHROME_PATH,
    "/usr/bin/google-chrome",
    "/usr/bin/google-chrome-stable",
    "/usr/bin/chromium",
    "/usr/bin/chromium-browser",
    "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
  ];
  return candidates.find((candidate): candidate is string =>
    Boolean(candidate && existsSync(candidate))
  );
}

function responseStateNamespace(connectionId: string, parsed: CodexParsedRequest): string {
  const identity = extractChatGptTurnIdentity(parsed);
  if (!identity.threadId || !identity.turnId) {
    throw new Error("Native Codex thread_id and turn_id are required");
  }
  return `${connectionId}:${identity.threadId}:${identity.turnId}`;
}

function previousResponseBelongsToTurn(
  body: Record<string, unknown>,
  connectionId: string,
  parsed: CodexParsedRequest
): boolean {
  if (typeof body.previous_response_id !== "string" || !body.previous_response_id.trim()) {
    return true;
  }
  try {
    const namespace = responseStateNamespace(connectionId, parsed);
    const expanded = expandPreviousResponseInput(body, namespace);
    return expanded !== body;
  } catch {
    return false;

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at open-sse/executors/chatgpt-web-codex.ts:114 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/0696cc2ded2b4eeb. Report an issue: GitHub.