ruvnet/ruflo · error · QEHiveError

Failed to spawn worker

Error message

Failed to spawn worker

What it means

spawnQEWorker() failed while joining a worker into the hive (hiveMind.join threw — hive unreachable, id conflict, or invalid role/capabilities). The catch logs the agent type and wraps the failure in QEHiveError; no worker id is returned.

Source

Thrown at v3/plugins/agentic-qe/src/bridges/QEHiveBridge.ts:237

      await this.hiveMind.join({
        agentId: workerId,
        role: 'worker',
        capabilities,
        metadata: {
          parentQueen: this.queenId,
          agentType,
          qeContext: context,
          spawnedAt: Date.now(),
        },
      });

      this.spawnedWorkers.set(workerId, agentType);
      this.logger.debug(`QE worker spawned: ${workerId}`);

      return workerId;
    } catch (error) {
      this.logger.error(`Failed to spawn QE worker: ${agentType}`, error);
      throw new QEHiveError('Failed to spawn worker', error as Error);
    }
  }

  /**
   * Coordinate a QE swarm task
   */
  async coordinateQESwarm(task: QESwarmTask): Promise<QESwarmResult> {
    this.ensureInitialized();

    try {
      this.logger.info(`Coordinating QE swarm task: ${task.id} (agents: ${task.agents.join(', ')})`);

      // 1. Propose task allocation via consensus
      const consensusResult = await this.proposeTaskAllocation(task, task.agents);

      if (!consensusResult.accepted) {
        this.logger.warn(`Task allocation rejected: ${consensusResult.reason}`);
        return {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Verify worker configuration and resource availability.
  2. Inspect the underlying spawn error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/plugins/agentic-qe/src/bridges/QEHiveBridge.ts:237 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/4556fe0c7166c107. Report an issue: GitHub.