paperclipai/paperclip · error

Annotation thread not found

Error message

Annotation thread not found

What it means

404 response from GET /issues/:id/documents/:key/annotations/:threadId. Fires after the document resolves but no annotation thread with the given threadId exists on that document (or the thread belongs to another document/issue), so the thread lookup returns null.

Source

Thrown at server/src/routes/issues.ts:7517

      agentApiKeyId: actor.agentApiKeyId,
      action: created ? "issue.watchdog_created" : "issue.watchdog_updated",
      entityType: "issue",
      entityId: issue.id,
      details: {
        identifier: issue.identifier,
        watchdogId: watchdog.id,
        watchdogAgentId: watchdog.watchdogAgentId,
        instructionsChanged: (existingWatchdog?.instructions ?? null) !== (watchdog.instructions ?? null),
      },
    });
    await queueTaskWatchdogEvaluation(issue, actor.runId);
    res.json(watchdog);
  });

  router.delete("/issues/:id/watchdog", async (req, res) => {
    const id = req.params.id as string;
    const issue = await getAccessibleResource(req, res, getIssueById(req, id), "Issue not found");
    if (!issue) return;
    if (!(await assertIssueReadAllowed(req, res, issue))) return;
    if (!(await assertAgentIssueMutationAllowed(req, res, issue))) return;
    if (await rejectTaskWatchdogConfigMutation(req, res)) return;
    if (await assertLowTrustControlPlaneDenied(req, res, issue.companyId, issue)) return;

    const actor = getActorInfo(req);
    const disabled = await taskWatchdogsSvc.disableForIssue(issue.companyId, issue.id, {
      agentId: actor.agentId,
      userId: actor.actorType === "user" ? actor.actorId : null,
      runId: actor.runId,
    });
    if (disabled) {
      await logActivity(db, {
        companyId: issue.companyId,
        actorType: actor.actorType,
        actorId: actor.actorId,
        agentId: actor.agentId,
        runId: actor.runId,

View on GitHub (pinned to 01ad858492)

Solutions

  1. Verify the id in the request path or body refers to an existing record in this company; re-list the parent collection to get a valid id.
  2. Check that the record was not deleted or archived, and that the request is scoped to the correct companyId.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/issues.ts:7073 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/1b7bc658e788c937. Report an issue: GitHub.