diegosouzapw/OmniRoute · error · Error

Claude Web browser retry requires a scoped UI template

Error message

Claude Web browser retry requires a scoped UI template

What it means

Precondition in sendClaudeWebBrowser: the request targets the retry_completion endpoint but no scoped UI template was found in the browser-template cache for the computed pool key. Retry turns require a previously stored template (captured from the original completion) to reconstruct the browser request; without it the retry cannot proceed.

Solutions

  1. Fall back to a fresh completion turn instead of retry_completion
  2. Ensure the original completion request ran in the same process/pool so its template was stored before the retry was attempted
  3. Check that buildClaudeWebBrowserPoolKey derives the same key for both the original and retry requests
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at open-sse/executors/claude-web/browserTransport.ts:454 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/7fa6ffed95d707b4. Report an issue: GitHub.

Appendix: source

Thrown at open-sse/executors/claude-web/browserTransport.ts:454

  const bytes = new Uint8Array(captured.body);
  return {
    status: captured.status,
    headers: new Headers(captured.headers),
    body: new Response(bytes).body,
  };
}

export async function sendClaudeWebBrowser(
  request: ClaudeWebTransportRequest,
  deps: ClaudeWebBrowserDeps = defaultDeps
): Promise<ClaudeWebTransportResult> {
  verifyRequestUrl(request);
  throwIfAborted(request.signal);
  const poolKey = buildClaudeWebBrowserPoolKey(request);
  const retryEntry =
    request.endpointSuffix === "retry_completion" ? lookupBrowserTemplate(poolKey) : null;
  if (request.endpointSuffix === "retry_completion" && !retryEntry) {
    throw new Error("Claude Web browser retry requires a scoped UI template");
  }

  const pooled = await deps.acquireContext(poolKey, {
    cookieDomain: ".claude.ai",
    cookieString: request.cookieString,
    warmupUrl: request.pageUrl,
    locale: request.locale,
    timezone: request.timezone,
    proxyProviderKey: "claude-web",
  });
  const page = await deps.openPage(pooled);
  try {
    if (retryEntry && retryEntry.context !== pooled.context) {
      throw new Error("Claude Web browser context no longer matches scoped UI template");
    }
    await page.goto(request.pageUrl, {
      waitUntil: "domcontentloaded",
      timeout: 60000,

View on GitHub (pinned to a179ffed5b)