{"record":{"id":"d431ba6f720aedf5","repo":"ruvnet/ruflo","slug":"worker-workerid-not-found","errorCode":null,"errorMessage":"Worker ${workerId} not found","messagePattern":"Worker (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/workers/index.ts","lineNumber":383,"sourceCode":"      throw new Error(`Maximum worker limit (${this.config.maxWorkers}) reached`);\n    }\n\n    const workerId = `worker-${this.nextWorkerId++}`;\n    const worker = new WorkerInstance(workerId, definition);\n\n    this._workers.set(workerId, worker);\n    this.poolMetrics.totalWorkers++;\n    this.poolMetrics.idleWorkers++;\n\n    this.emit(WORKER_EVENTS.SPAWNED, { workerId, definition });\n\n    return worker;\n  }\n\n  async terminate(workerId: string): Promise<void> {\n    const worker = this._workers.get(workerId);\n    if (!worker) {\n      throw new Error(`Worker ${workerId} not found`);\n    }\n\n    await worker.terminate();\n    this._workers.delete(workerId);\n    this.poolMetrics.totalWorkers--;\n\n    if (worker.status === 'idle') {\n      this.poolMetrics.idleWorkers--;\n    } else if (worker.status === 'busy') {\n      this.poolMetrics.activeWorkers--;\n    }\n  }\n\n  async submit(task: WorkerTask): Promise<WorkerTaskResult> {\n    // Find available worker\n    const worker = this.getAvailableWorker();\n\n    if (!worker) {","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/workers/index.ts#L365-L401","documentation":"WorkerPool.terminate could not find a worker with the given workerId in the pool's worker map. The id was never spawned, was already terminated and removed, or is malformed — there is nothing to terminate.","triggerScenarios":"An operation references a worker id that does not exist in the pool.","commonSituations":"Worker already terminated/removed, or a stale/incorrect worker id used by the caller.","solutions":["Verify the worker exists in the pool before operating on it.","Handle worker termination events so stale ids are not reused."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}