{"record":{"id":"7f4c79ef9fee32a5","repo":"diegosouzapw/OmniRoute","slug":"claude-web-browser-interception-target-changed","errorCode":null,"errorMessage":"Claude Web browser interception target changed","messagePattern":"Claude Web browser interception target changed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/claude-web/browserTransport.ts","lineNumber":383,"sourceCode":"      segments[1] !== \"organizations\" ||\n      segments[3] !== \"chat_conversations\" ||\n      !segments[4] ||\n      segments[5] !== \"completion\"\n    ) {\n      return false;\n    }\n    try {\n      return decodeURIComponent(segments[2]) === request.organizationId;\n    } catch {\n      return false;\n    }\n  };\n\n  await page.route(matchesPreparedRoute, async (route) => {\n    try {\n      const outgoing = route.request();\n      if (outgoing.method() !== \"POST\" || !matchesPreparedRoute(new URL(outgoing.url()))) {\n        throw new Error(\"Claude Web browser interception target changed\");\n      }\n      const rawPayload = outgoing.postData();\n      if (!rawPayload) throw new Error(\"Claude Web browser request body is missing\");\n      const uiPayload = JSON.parse(rawPayload) as unknown;\n      if (!uiPayload || typeof uiPayload !== \"object\" || Array.isArray(uiPayload)) {\n        throw new Error(\"Claude Web browser request body is invalid\");\n      }\n      const capturedHeaders = await outgoing.allHeaders();\n      const template = extractBrowserTemplate(uiPayload as Record<string, unknown>);\n      const merged = mergeClaudeWebBrowserPayload(\n        uiPayload as Record<string, unknown>,\n        request.payload\n      );\n      await route.abort();\n      rememberBrowserTemplate(poolKey, template, context);\n      resolveInterception?.(makeBrowserFetchInput(request, merged, capturedHeaders));\n    } catch {\n      await route.abort().catch(() => {});","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/claude-web/browserTransport.ts#L365-L401","documentation":"Playwright route-interception guard in captureCompletion: a request matched the page.route() glob but failed the strict re-check (method POST plus exact /organizations/{org}/chat_conversations/{id}/completion path). It means the interceptor caught a request whose actual URL or method differs from the prepared conversation target — e.g. claude.ai issued a redirect or auxiliary API call that fell inside the route pattern.","triggerScenarios":"Thrown at open-sse/executors/claude-web/browserTransport.ts:383 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Tighten the page.route() pattern so only the exact completion endpoint is intercepted","Retry the turn: transient auxiliary requests during page warmup can hit the broad route; a fresh capture usually intercepts the right POST","If persistent, capture and log outgoing.url() to identify which claude.ai request is colliding"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}