{"record":{"id":"49a7a1630dc01d17","repo":"ruvnet/ruflo","slug":"teammate-not-found","errorCode":"TEAMMATE_NOT_FOUND","errorMessage":"No pending join request for agent: ${agentId}","messagePattern":"No pending join request for agent: (.+?)","errorType":"exception","errorClass":"TeammateError","httpStatus":null,"severity":"error","filePath":"v3/plugins/teammate-plugin/src/teammate-bridge.ts","lineNumber":913,"sourceCode":"      const config = JSON.parse(fs.readFileSync(configPath, 'utf-8')) as TeamConfig;\n      if (config.autoApproveJoin) {\n        await this.approveJoin(teamName, agentInfo.id);\n      }\n    }\n  }\n\n  /**\n   * Approve a join request\n   */\n  async approveJoin(teamName: string, agentId: string): Promise<void> {\n    this.ensureAvailable();\n\n    const team = this.getTeamOrThrow(teamName);\n\n    const requestIndex = team.pendingJoinRequests.findIndex(r => r.agentId === agentId);\n\n    if (requestIndex === -1) {\n      throw new TeammateError(\n        `No pending join request for agent: ${agentId}`,\n        TeammateErrorCode.TEAMMATE_NOT_FOUND,\n        teamName,\n        agentId\n      );\n    }\n\n    const request = team.pendingJoinRequests.splice(requestIndex, 1)[0];\n\n    const teammate: TeammateInfo = {\n      id: agentId,\n      name: request.agentName,\n      role: request.role,\n      status: 'active',\n      spawnedAt: new Date(),\n      messagesSent: 0,\n      messagesReceived: 0,\n    };","sourceCodeStart":895,"sourceCodeEnd":931,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/teammate-plugin/src/teammate-bridge.ts#L895-L931","documentation":"approveJoin() searched the team's pendingJoinRequests for the given agentId and found no entry. Either the agent never submitted a join request, it was already approved/rejected, or the wrong agentId was passed — there is nothing pending to approve.","triggerScenarios":"Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:913 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the agent has submitted a join request before approving; list pending requests first."],"exampleFix":null,"handlingStrategy":"validation","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"}