ruvnet/ruflo · error
Worker ${workerId} not found
Error message
Worker ${workerId} not found What it means
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.
Source
Thrown at v3/@claude-flow/plugins/src/workers/index.ts:383
throw new Error(`Maximum worker limit (${this.config.maxWorkers}) reached`);
}
const workerId = `worker-${this.nextWorkerId++}`;
const worker = new WorkerInstance(workerId, definition);
this._workers.set(workerId, worker);
this.poolMetrics.totalWorkers++;
this.poolMetrics.idleWorkers++;
this.emit(WORKER_EVENTS.SPAWNED, { workerId, definition });
return worker;
}
async terminate(workerId: string): Promise<void> {
const worker = this._workers.get(workerId);
if (!worker) {
throw new Error(`Worker ${workerId} not found`);
}
await worker.terminate();
this._workers.delete(workerId);
this.poolMetrics.totalWorkers--;
if (worker.status === 'idle') {
this.poolMetrics.idleWorkers--;
} else if (worker.status === 'busy') {
this.poolMetrics.activeWorkers--;
}
}
async submit(task: WorkerTask): Promise<WorkerTaskResult> {
// Find available worker
const worker = this.getAvailableWorker();
if (!worker) {View on GitHub (pinned to fa13ee4ad6)
Solutions
- Verify the worker exists in the pool before operating on it.
- Handle worker termination events so stale ids are not reused.
Defensive patterns
Strategy: validation
When it happens
Trigger: An operation references a worker id that does not exist in the pool.
Common situations: Worker already terminated/removed, or a stale/incorrect worker id used by the caller.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/d431ba6f720aedf5.
Report an issue: GitHub.