diegosouzapw/OmniRoute · error · Error
Claude Web browser request endpoint does not match prepared…
Error message
Claude Web browser request endpoint does not match prepared state
What it means
Internal consistency guard in verifyRequestUrl: the URL on the prepared Claude Web transport request does not equal the URL reconstructed from its organizationId/conversationId/endpointSuffix fields. It fires only when the request object is internally inconsistent (caller mutated url or ids after preparation), not from upstream behavior.
Solutions
- Rebuild the ClaudeWebTransportRequest so url is derived via expectedRequestUrl() from the same organizationId, conversationId and endpointSuffix
- Check the caller in the claude-web executor for any mutation of request.url after preparation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at open-sse/executors/claude-web/browserTransport.ts:100 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/e3535a1eae5281f2.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/executors/claude-web/browserTransport.ts:100
function now(): number {
return testNow ?? Date.now();
}
function cloneValue<T>(value: T): T {
return structuredClone(value);
}
function expectedRequestUrl(request: ClaudeWebTransportRequest): string {
return (
"https://claude.ai/api/organizations/" +
`${encodeURIComponent(request.organizationId)}/chat_conversations/` +
`${encodeURIComponent(request.conversationId)}/${request.endpointSuffix}`
);
}
function verifyRequestUrl(request: ClaudeWebTransportRequest): void {
if (request.url !== expectedRequestUrl(request)) {
throw new Error("Claude Web browser request endpoint does not match prepared state");
}
}
function extractBrowserTemplate(uiPayload: Record<string, unknown>): BrowserTemplate {
return {
tools: Array.isArray(uiPayload.tools)
? cloneValue(uiPayload.tools as ClaudeWebRequestPayload["tools"])
: [],
...(Array.isArray(uiPayload.tool_states)
? { toolStates: cloneValue(uiPayload.tool_states) }
: {}),
personalizedStyles: Array.isArray(uiPayload.personalized_styles)
? cloneValue(uiPayload.personalized_styles as ClaudeWebRequestPayload["personalized_styles"])
: [],
};
}
function pruneExpiredTemplates(): void {View on GitHub (pinned to a179ffed5b)