{"record":{"id":"f6a13353a27f3126","repo":"paperclipai/paperclip","slug":"timed-out-waiting-for-host-bridge-response","errorCode":null,"errorMessage":"Timed out waiting for host bridge response.","messagePattern":"Timed out waiting for host bridge response\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/sandbox-callback-bridge.ts","lineNumber":2055,"sourceCode":"/**\n * The zero-dependency codec the generated duplex gateway embeds. It is a plain\n * JavaScript copy of the encode side of the host codec in `duplex-frame-codec.ts`.\n * The generated gateway never decodes: it writes exactly one READY line, then\n * hands stdout to its transport. So this copy carries only the frame version and\n * the encode function, not a decoder. It uses only the `Buffer` and `JSON`\n * globals, so the generated `.mjs` needs no workspace import. It carries no\n * template literal and no `${` sequence, so it embeds inside the gateway\n * template literal with no escape.\n *\n * A shared fixture file (`duplex-frame-vectors.json`) proves the host encode side\n * stays wire compatible with this copy. {@link getSandboxDuplexGatewayCodecSource}\n * returns this exact source so a test can run the READY encode vector against it.\n */\nconst DUPLEX_GATEWAY_CODEC_SOURCE = `const DUPLEX_FRAME_VERSION = 2;\n\nfunction encodeDuplexFrame(frame) {\n  return JSON.stringify(frame) + \"\\\\n\";\n}`;\n\n/**\n * Return the exact zero-dependency codec source the generated duplex gateway\n * embeds. A test wraps this source and calls `encodeDuplexFrame` to prove the\n * embedded copy encodes the READY frame the same way the host encode side does.\n * The source declares `encodeDuplexFrame` and `DUPLEX_FRAME_VERSION`, but exports\n * neither; a caller wraps it to read those names.\n */\nexport function getSandboxDuplexGatewayCodecSource(): string {\n  return DUPLEX_GATEWAY_CODEC_SOURCE;\n}\n\n/**\n * Zero-dependency source for the gateway's own aggregate body-byte ledger.\n * `readBodyBytes` in the generated gateway reserves against one instance of\n * this ledger before it retains a chunk and before it concatenates the final\n * buffer, so a burst of concurrent requests cannot grow the gateway\n * process's own memory without limit. This ledger is separate from, and","sourceCodeStart":2037,"sourceCodeEnd":2073,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/adapter-utils/src/sandbox-callback-bridge.ts#L2037-L2073","documentation":"Thrown by waitForResponse in the sandbox callback bridge host process. Fires when no response file appears for the requestId within responseTimeoutMs — the sandbox-side request was queued but the host never wrote replies/response.json in time.","triggerScenarios":"Thrown at packages/adapter-utils/src/sandbox-callback-bridge.ts:1792 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry; the host bridge response timed out.","Check that the host bridge server is running and reachable."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-21T17:58:32.592Z","contentChangedAt":"2026-08-21T17:58:32.592Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}