paperclipai/paperclip · error

This issue is linked to a closed workspace that cannot be re

Error message

This issue is linked to a closed workspace that cannot be reopened.

What it means

reopenClosedIssueExecutionWorkspaceOrRespond could not reopen the issue's closed workspace because the linked workspace is in a state that cannot transition back to open (e.g. destroyed or non-reopenable lifecycle state).

Source

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

    if (!issue.assigneeAgentId) return null;
    const rows = await executor
      .select()
      .from(agentWakeupRequests)
      .where(and(
        eq(agentWakeupRequests.companyId, issue.companyId),
        eq(agentWakeupRequests.agentId, issue.assigneeAgentId),
        inArray(agentWakeupRequests.status, ["deferred_issue_execution", "queued"]),
      ))
      .orderBy(asc(agentWakeupRequests.requestedAt));

    for (const wake of rows) {
      if (
        readObject(wake.payload).issueId !== issue.id
        || queuedCommentIdsFromWakePayload(wake.payload).length === 0
      ) continue;
      if (wake.status === "deferred_issue_execution") {
        return { wake, state: "deferred", queueRun: null };
      }
      if (!wake.runId) continue;
      const queueRun = await executor
        .select()
        .from(heartbeatRuns)
        .where(and(
          eq(heartbeatRuns.id, wake.runId),
          eq(heartbeatRuns.companyId, issue.companyId),
          eq(heartbeatRuns.agentId, issue.assigneeAgentId),
          eq(heartbeatRuns.wakeupRequestId, wake.id),
          eq(heartbeatRuns.status, "queued"),
        ))
        .limit(1)
        .then((runRows) => runRows[0] ?? null);
      if (queueRun) return { wake, state: "queued", queueRun };
    }
    return null;
  }

View on GitHub (pinned to 01ad858492)

Solutions

  1. This is an authorization rule, not a bug: perform the action with an actor that satisfies the stated constraint (board user, the owning agent, or an in-scope resource).
  2. If access should be allowed, verify the actor's credentials/company scope and the resource's ownership before retrying.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/issues.ts:5350 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/58732b601a5fba90. Report an issue: GitHub.