paperclipai/paperclip · error · Error

Timed out waiting for host bridge response.

Error message

Timed out waiting for host bridge response.

What it means

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.

Source

Thrown at packages/adapter-utils/src/sandbox-callback-bridge.ts:2055

/**
 * The zero-dependency codec the generated duplex gateway embeds. It is a plain
 * JavaScript copy of the encode side of the host codec in `duplex-frame-codec.ts`.
 * The generated gateway never decodes: it writes exactly one READY line, then
 * hands stdout to its transport. So this copy carries only the frame version and
 * the encode function, not a decoder. It uses only the `Buffer` and `JSON`
 * globals, so the generated `.mjs` needs no workspace import. It carries no
 * template literal and no `${` sequence, so it embeds inside the gateway
 * template literal with no escape.
 *
 * A shared fixture file (`duplex-frame-vectors.json`) proves the host encode side
 * stays wire compatible with this copy. {@link getSandboxDuplexGatewayCodecSource}
 * returns this exact source so a test can run the READY encode vector against it.
 */
const DUPLEX_GATEWAY_CODEC_SOURCE = `const DUPLEX_FRAME_VERSION = 2;

function encodeDuplexFrame(frame) {
  return JSON.stringify(frame) + "\\n";
}`;

/**
 * Return the exact zero-dependency codec source the generated duplex gateway
 * embeds. A test wraps this source and calls `encodeDuplexFrame` to prove the
 * embedded copy encodes the READY frame the same way the host encode side does.
 * The source declares `encodeDuplexFrame` and `DUPLEX_FRAME_VERSION`, but exports
 * neither; a caller wraps it to read those names.
 */
export function getSandboxDuplexGatewayCodecSource(): string {
  return DUPLEX_GATEWAY_CODEC_SOURCE;
}

/**
 * Zero-dependency source for the gateway's own aggregate body-byte ledger.
 * `readBodyBytes` in the generated gateway reserves against one instance of
 * this ledger before it retains a chunk and before it concatenates the final
 * buffer, so a burst of concurrent requests cannot grow the gateway
 * process's own memory without limit. This ledger is separate from, and

View on GitHub (pinned to 01ad858492)

Solutions

  1. Retry; the host bridge response timed out.
  2. Check that the host bridge server is running and reachable.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/adapter-utils/src/sandbox-callback-bridge.ts:1792 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-21). Data as JSON: /api/errors/f6a13353a27f3126. Report an issue: GitHub.