{"record":{"id":"462fba8a9c9d1cf3","repo":"ruvnet/ruflo","slug":"deadlock-detected","errorCode":null,"errorMessage":"Deadlock detected:","messagePattern":"Deadlock detected:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/shared/src/core/orchestrator/event-coordinator.ts","lineNumber":98,"sourceCode":"    // Also unregister from event bus\n    this.eventBus.off(type, handler);\n  }\n\n  getEventBus(): IEventBus {\n    return this.eventBus;\n  }\n\n  private registerSystemHandlers(): void {\n    // Error handling\n    this.eventBus.on(SystemEventTypes.SYSTEM_ERROR, (event: IEvent) => {\n      const { error, component } = event.payload as { error: Error; component: string };\n      console.error(`System error in ${component}:`, error);\n    });\n\n    // Deadlock detection\n    this.eventBus.on(SystemEventTypes.DEADLOCK_DETECTED, (event: IEvent) => {\n      const { agents, resources } = event.payload as { agents: string[]; resources: string[] };\n      console.warn('Deadlock detected:', { agents, resources });\n    });\n  }\n\n  /**\n   * Get registered handler count for a type\n   */\n  getHandlerCount(type: string): number {\n    return this.handlers.get(type)?.size ?? 0;\n  }\n\n  /**\n   * Get all registered event types\n   */\n  getRegisteredTypes(): string[] {\n    return Array.from(this.handlers.keys());\n  }\n\n  /**","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/shared/src/core/orchestrator/event-coordinator.ts#L80-L116","documentation":"System handler registered by EventCoordinator.registerSystemHandlers(): a DEADLOCK_DETECTED system event arrived carrying the involved agents and resources, logged to console.error. The coordinator only reports the deadlock; resolution is left to callers.","triggerScenarios":"Thrown at v3/@claude-flow/shared/src/core/orchestrator/event-coordinator.ts:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the circular wait chain in the event coordinator; break the cycle by reordering subscriptions or adding timeouts."],"exampleFix":null,"handlingStrategy":"fallback","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"}