ruvnet/ruflo · error
Worker ${this.id} is terminated
Error message
Worker ${this.id} is terminated What it means
WorkerInstance.execute was invoked after the worker reached the 'terminated' status. A terminated worker has been torn down and cannot accept tasks, so any queued or in-flight dispatch to this worker id is rejected as an illegal lifecycle use.
Source
Thrown at v3/@claude-flow/plugins/src/workers/index.ts:146
}
private initMetrics(): WorkerMetrics {
return {
tasksExecuted: 0,
tasksSucceeded: 0,
tasksFailed: 0,
avgDuration: 0,
totalTokensUsed: 0,
currentLoad: 0,
uptime: 0,
lastActivity: Date.now(),
healthScore: 1.0,
};
}
async execute(task: WorkerTask): Promise<WorkerTaskResult> {
if (this._status === 'terminated') {
throw new Error(`Worker ${this.id} is terminated`);
}
this._status = 'busy';
this._currentTask = task;
this.lastActivity = Date.now();
const startTime = Date.now();
try {
// Execute task via agentic-flow task runner
const result = await this.executeTask(task);
const duration = Date.now() - startTime;
this.updateMetrics(true, duration, result.tokensUsed);
this._status = 'idle';
this._currentTask = undefined;
return {View on GitHub (pinned to fa13ee4ad6)
Solutions
- Check the worker's terminated state before using it.
- Spawn a new worker if more work remains after termination.
Defensive patterns
Strategy: validation
When it happens
Trigger: An operation is attempted on a worker that has already been terminated.
Common situations: Posting tasks or messages to a worker after terminate() was called.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/33c37a7ed0cd0aec.
Report an issue: GitHub.