ruvnet/ruflo · error · Error
Handoff not addressed to ${this.formatClaimant(claimant)}
Error message
Handoff not addressed to ${this.formatClaimant(claimant)} What it means
Second guard in acceptHandoff(): a handoff is pending, but claim.handoffTo is not isSameClaimant to the caller. This stops a claimant other than the intended recipient from accepting the handoff. The message names the caller's claimant via formatClaimant.
Source
Thrown at v3/@claude-flow/cli/src/services/claim-service.ts:362
await this.saveClaims();
this.emitEvent({
type: 'issue:handoff:requested',
timestamp: new Date(),
issueId,
claimant: from,
data: { to, reason },
});
}
async acceptHandoff(issueId: string, claimant: Claimant): Promise<void> {
const claim = this.claims.get(issueId);
if (!claim || claim.status !== 'handoff-pending') {
throw new Error(`No pending handoff for issue ${issueId}`);
}
if (!claim.handoffTo || !this.isSameClaimant(claim.handoffTo, claimant)) {
throw new Error(`Handoff not addressed to ${this.formatClaimant(claimant)}`);
}
const previousClaimant = claim.claimant;
claim.claimant = claimant;
claim.status = 'active';
claim.statusChangedAt = new Date();
delete claim.handoffTo;
delete claim.handoffReason;
await this.saveClaims();
this.emitEvent({
type: 'issue:handoff:accepted',
timestamp: new Date(),
issueId,
claimant,
previousClaimant,
});
}View on GitHub (pinned to 6b01dc5a68)
Solutions
- Ensure the accepter's claimant exactly matches the `to` passed to requestHandoff.
- If the intended recipient is unavailable, reject the handoff first, then re-request to a new recipient.
- Validate recipient identity before issuing the handoff request.
Example fix
// before: wrong recipient accepts
await claims.acceptHandoff(issueId, agentC); // addressed to agentB -> throws
// after: only the addressed recipient accepts
if (isSameClaimant(me, claim.handoffTo)) {
await claims.acceptHandoff(issueId, me);
} else {
// not ours to accept; optionally reject with reason
} Defensive patterns
Strategy: validation
Validate before calling
function canAcceptHandoff(claims, issueId, claimant) {
const c = claims.list?.().find(x => x.issueId === issueId);
return !!c && c.status === 'handoff-pending' && !!c.handoffTo && isSameClaimant(c.handoffTo, claimant);
} Prevention
- Ensure the accepter matches the `to` passed to requestHandoff exactly.
- If the recipient is unavailable, reject first then re-request to a new recipient.
- Validate recipient identity before issuing the handoff request.
When it happens
Trigger: Agent C trying to accept a handoff addressed to agent B; a human trying to accept an agent-targeted handoff; using a claimant whose agentId differs from the handoffTo by a typo or stale id.
Common situations: Broadcast handoff offers where multiple agents race to accept; mismatched identity between requestHandoff `to` and the accepter; tests using placeholder claimants.
Related errors
- Issue ${issueId} is not claimed by ${this.formatClaimant(fro
- Issue ${issueId} is not claimed by ${this.formatClaimant(cla
- Issue ${input.issueId} is not claimed by ${input.claimantId}
- UNAUTHORIZED
- No pending handoff for issue ${issueId}
AI-assisted analysis of ruvnet/ruflo@6b01dc5a68 (2026-08-12).
Data as JSON: /api/errors/8560bfbb75284df4.
Report an issue: GitHub.