{"record":{"id":"835d50d2d5c07f5e","repo":"ruvnet/ruflo","slug":"failed-to-list-agents","errorCode":null,"errorMessage":"Failed to list agents","messagePattern":"Failed to list agents","errorType":"exception","errorClass":"QECoreError","httpStatus":null,"severity":"error","filePath":"v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts","lineNumber":365,"sourceCode":"  /**\n   * List available agents by type\n   */\n  async listAgents(filter?: { type?: string; status?: string }): Promise<AgentHandle[]> {\n    try {\n      this.logger.debug(`Listing agents with filter: ${JSON.stringify(filter)}`);\n\n      const agents = await this.agents.list({\n        type: filter?.type,\n        status: filter?.status,\n      });\n\n      // Filter to only QE agents\n      const qeAgents = agents.filter((a) => a.type.startsWith('qe-'));\n\n      return qeAgents.map((agent) => new AgentHandleImpl(agent, this.agents, this.logger));\n    } catch (error) {\n      this.logger.error('Failed to list agents', error);\n      throw new QECoreError('Failed to list agents', error as Error);\n    }\n  }\n\n  /**\n   * Get agent by ID\n   */\n  async getAgent(agentId: string): Promise<AgentHandle | null> {\n    try {\n      // Check active handles first\n      const activeHandle = this.activeHandles.get(agentId);\n      if (activeHandle && 'type' in activeHandle) {\n        return activeHandle as AgentHandle;\n      }\n\n      const agent = await this.agents.get(agentId);\n      if (!agent) return null;\n\n      return new AgentHandleImpl(agent, this.agents, this.logger);","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts#L347-L383","documentation":"QECoreBridge.listAgents caught a failure from the underlying agent-list call and rethrew as QECoreError. The agent service could not enumerate agents (service down, auth, or transport issue); the optional type/status filter is not the fault.","triggerScenarios":"Thrown at v3/plugins/agentic-qe/src/bridges/QECoreBridge.ts:365 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the core bridge connection before listing agents.","Inspect the underlying error for the list operation."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T05:17:10.506Z"}