{"record":{"id":"9d7e81c8d752ec13","repo":"ruvnet/ruflo","slug":"already-claimed","errorCode":"ALREADY_CLAIMED","errorMessage":"Issue ${issueId} is already claimed by ${existingClaim.claimant.name}","messagePattern":"Issue (.+?) is already claimed by (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/claims/src/application/claim-service.ts","lineNumber":178,"sourceCode":"    // Validate issue exists\n    const issue = await this.issueRepository.findById(issueId);\n    if (!issue) {\n      return {\n        success: false,\n        error: {\n          code: 'ISSUE_NOT_FOUND',\n          message: `Issue ${issueId} not found`,\n        },\n      };\n    }\n\n    // Check if already claimed\n    const existingClaim = await this.claimRepository.findByIssueId(issueId);\n    if (existingClaim && existingClaim.status === 'active') {\n      return {\n        success: false,\n        error: {\n          code: 'ALREADY_CLAIMED',\n          message: `Issue ${issueId} is already claimed by ${existingClaim.claimant.name}`,\n          details: { currentClaimant: existingClaim.claimant },\n        },\n      };\n    }\n\n    // Check claimant's current workload\n    const currentClaimCount = await this.claimRepository.countByClaimant(claimant.id);\n    const maxClaims = claimant.maxConcurrentClaims ?? 5;\n    if (currentClaimCount >= maxClaims) {\n      return {\n        success: false,\n        error: {\n          code: 'MAX_CLAIMS_EXCEEDED',\n          message: `Claimant ${claimant.name} has reached maximum concurrent claims (${maxClaims})`,\n          details: { currentClaims: currentClaimCount, maxClaims },\n        },\n      };","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/claims/src/application/claim-service.ts#L160-L196","documentation":"claim() found an existing claim for the issue with status 'active', so another claimant already holds it. Concurrency guard: only one active claim per issue is allowed; the current claimant's name is returned so the caller knows who owns the work.","triggerScenarios":"Thrown at v3/@claude-flow/claims/src/application/claim-service.ts:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the current claim status before claiming; skip or release the existing claim if it belongs to a stale claimant.","Implement claim takeover/renewal semantics so a conflicting claim surfaces as a recoverable state instead of a hard failure."],"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"}