{"record":{"id":"100d86f6ba94270a","repo":"paperclipai/paperclip","slug":"worker-initialize-failed-for-pluginid-msg","errorCode":null,"errorMessage":"Worker initialize failed for \"${pluginId}\": ${msg}","messagePattern":"Worker initialize failed for \"(.+?)\": (.+?)","errorType":"exception","errorClass":"Error","httpStatus":400,"severity":"error","filePath":"server/src/services/plugin-worker-manager.ts","lineNumber":2561,"sourceCode":"      writeByteCount?: number,\n    ): void => {\n      if (route.state !== \"open\") return;\n      if (route.pendingRequests >= maxDuplexChannelPendingRequests) {\n        void terminalizeDuplexChannelRoute(route);\n        return;\n      }\n      // The route-local pending-write byte bound: a worker that never replies\n      // cannot make one route hold an unbounded number of write bytes, even\n      // under a raised pending-request count. A stop request carries no\n      // payload, so it never counts against this bound.\n      const pendingWriteBytesToCharge = method === \"duplexChannelWrite\" ? writeByteCount ?? 0 : 0;\n      if (route.pendingWriteBytes + pendingWriteBytesToCharge > maxDuplexRoutePendingWriteBytes) {\n        void terminalizeDuplexChannelRoute(route);\n        return;\n      }\n      route.pendingRequests += 1;\n      route.pendingWriteBytes += pendingWriteBytesToCharge;\n      void callInternal(method, params, duplexChannelOpenTimeoutMs, undefined)\n        // A send failure, an RPC rejection, a timeout, or a worker exit ends up\n        // here. The route already handles a lost write through its own state\n        // (a worker exit or a stop rejects every pending request through the\n        // normal call machinery), so this fire-and-forget call swallows the\n        // rejection instead of leaving it unhandled.\n        .catch(() => {})\n        .finally(() => {\n          route.pendingRequests -= 1;\n          // Release the route-local pending-write bytes one time, after the RPC\n          // settles on any path: success, error, timeout, worker exit, or\n          // shutdown.\n          route.pendingWriteBytes -= pendingWriteBytesToCharge;\n        });\n    };\n\n    return {\n      onData(listener: (chunk: Uint8Array) => void): void {\n        route.listener = listener;","sourceCodeStart":2543,"sourceCodeEnd":2579,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/plugin-worker-manager.ts#L2543-L2579","documentation":"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.","triggerScenarios":"Thrown at server/src/services/plugin-worker-manager.ts:1754 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the worker initialize failure shown in the message (manifest mismatch, handshake timeout, missing entrypoint) and restart the plugin."],"exampleFix":null,"handlingStrategy":"retry","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"}