{"record":{"id":"c63b283e371e4696","repo":"paperclipai/paperclip","slug":"bridge-request-body-exceeded-the-configured-size-l","errorCode":null,"errorMessage":"Bridge request body exceeded the configured size limit.","messagePattern":"Bridge request body exceeded the configured size limit\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/sandbox-callback-bridge.ts","lineNumber":2014,"sourceCode":"  const headerAllowlist = options.headerAllowlist ?? DEFAULT_SANDBOX_CALLBACK_BRIDGE_HEADER_ALLOWLIST;\n  const session = http2.connect(`http://${authority}`, {\n    createConnection: options.createConnection,\n  });\n  // A session-level fault fails every in-flight `forwardRequest` call through\n  // that stream's own `error`/`aborted` handler. This listener only stops\n  // Node from raising an unhandled `error` event for the session itself.\n  session.on(\"error\", () => undefined);\n  session.on(\"goaway\", (errorCode: number, lastStreamId: number) => {\n    options.onGoaway?.({ lastStreamId, errorCode });\n  });\n\n  return {\n    forwardRequest(request: SandboxHttp2BridgeGatewayRequest): Promise<SandboxHttp2BridgeGatewayResponse> {\n      // The gateway check (accepted security fix 4 keeps this as well as the\n      // independent host-side check): a request whose token does not match\n      // the per-run bridge token never opens a stream.\n      if (!compareBridgeTokensConstantTime(options.bridgeToken, request.receivedToken)) {\n        return Promise.reject(new Error(\"Invalid bridge token.\"));\n      }\n      return forwardOneHttp2Request(session, {\n        bridgeToken: options.bridgeToken,\n        method: request.method,\n        path: request.path,\n        query: request.query,\n        headers: sanitizeSandboxCallbackBridgeHeaders(request.headers, headerAllowlist),\n        body: request.body,\n      });\n    },\n    close(): Promise<void> {\n      return new Promise((resolve) => {\n        if (session.closed || session.destroyed) {\n          resolve();\n          return;\n        }\n        session.close(() => resolve());\n      });","sourceCodeStart":1996,"sourceCodeEnd":2032,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/adapter-utils/src/sandbox-callback-bridge.ts#L1996-L2032","documentation":"Request-size enforcement on the bridge's HTTP readBody: an inbound request body accumulated past the configured maxBodyBytes limit, so it is rejected mid-stream to bound memory use on the host side.","triggerScenarios":"Thrown at packages/adapter-utils/src/sandbox-callback-bridge.ts:1763 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the bridge request body size.","Raise the configured body size limit if large requests are expected."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}