paperclipai/paperclip · error · Error

Worker initialize failed for

Error message

Worker initialize failed for "${pluginId}": ${msg}

What it means

The plugin worker process spawned but its initialize handshake failed (timeout, RPC error, or ok=false response). The worker process is killed and the underlying failure message is propagated wrapped with the plugin id.

Solutions

  1. Fix the worker initialize failure shown in the message (manifest mismatch, handshake timeout, missing entrypoint) and restart the plugin.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at server/src/services/plugin-worker-manager.ts:1754 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at server/src/services/plugin-worker-manager.ts:2561

      writeByteCount?: number,
    ): void => {
      if (route.state !== "open") return;
      if (route.pendingRequests >= maxDuplexChannelPendingRequests) {
        void terminalizeDuplexChannelRoute(route);
        return;
      }
      // The route-local pending-write byte bound: a worker that never replies
      // cannot make one route hold an unbounded number of write bytes, even
      // under a raised pending-request count. A stop request carries no
      // payload, so it never counts against this bound.
      const pendingWriteBytesToCharge = method === "duplexChannelWrite" ? writeByteCount ?? 0 : 0;
      if (route.pendingWriteBytes + pendingWriteBytesToCharge > maxDuplexRoutePendingWriteBytes) {
        void terminalizeDuplexChannelRoute(route);
        return;
      }
      route.pendingRequests += 1;
      route.pendingWriteBytes += pendingWriteBytesToCharge;
      void callInternal(method, params, duplexChannelOpenTimeoutMs, undefined)
        // A send failure, an RPC rejection, a timeout, or a worker exit ends up
        // here. The route already handles a lost write through its own state
        // (a worker exit or a stop rejects every pending request through the
        // normal call machinery), so this fire-and-forget call swallows the
        // rejection instead of leaving it unhandled.
        .catch(() => {})
        .finally(() => {
          route.pendingRequests -= 1;
          // Release the route-local pending-write bytes one time, after the RPC
          // settles on any path: success, error, timeout, worker exit, or
          // shutdown.
          route.pendingWriteBytes -= pendingWriteBytesToCharge;
        });
    };

    return {
      onData(listener: (chunk: Uint8Array) => void): void {
        route.listener = listener;

View on GitHub (pinned to 01ad858492)