{"record":{"id":"1fcd68fc94ba1184","repo":"ruvnet/ruflo","slug":"delegation-denied","errorCode":"DELEGATION_DENIED","errorMessage":"No active delegation from ${fromId} to ${toId}","messagePattern":"No active delegation from (.+?) to (.+?)","errorType":"exception","errorClass":"TeammateError","httpStatus":null,"severity":"error","filePath":"v3/plugins/teammate-plugin/src/teammate-bridge.ts","lineNumber":1462,"sourceCode":"    this.emit('delegate:granted', { team: teamName, from: fromId, to: toId, permissions });\n\n    return delegation;\n  }\n\n  /**\n   * Revoke delegation from a teammate\n   */\n  async revokeDelegation(teamName: string, fromId: string, toId: string): Promise<void> {\n    this.ensureAvailable();\n\n    const team = this.getTeamOrThrow(teamName);\n\n    const delegationIndex = team.delegations.findIndex(\n      d => d.fromId === fromId && d.toId === toId && d.active\n    );\n\n    if (delegationIndex === -1) {\n      throw new TeammateError(\n        `No active delegation from ${fromId} to ${toId}`,\n        TeammateErrorCode.DELEGATION_DENIED,\n        teamName\n      );\n    }\n\n    team.delegations[delegationIndex].active = false;\n\n    // Update target teammate\n    const toTeammate = team.teammates.find(t => t.id === toId);\n    if (toTeammate) {\n      const delegation = team.delegations[delegationIndex];\n      toTeammate.delegatedPermissions = (toTeammate.delegatedPermissions ?? [])\n        .filter(p => !delegation.permissions.includes(p));\n\n      if (toTeammate.delegatedPermissions.length === 0) {\n        toTeammate.delegatedFrom = undefined;\n      }","sourceCodeStart":1444,"sourceCodeEnd":1480,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/teammate-plugin/src/teammate-bridge.ts#L1444-L1480","documentation":"revokeDelegation() searched team.delegations for an entry with matching fromId/toId that is still active and found none. The delegation was already revoked, never existed, or the ids are wrong — there is no active grant to revoke.","triggerScenarios":"Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:1462 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify a delegation exists between the two agents before revoking/acting on it; list active delegations 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"}