{"record":{"id":"84a84130dd633b38","repo":"paperclipai/paperclip","slug":"cancelled-issues-must-be-restored-through-the-dedi","errorCode":null,"errorMessage":"Cancelled issues must be restored through the dedicated restore flow","messagePattern":"Cancelled issues must be restored through the dedicated restore flow","errorType":"http","errorClass":null,"httpStatus":409,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":5204,"sourceCode":"    return false;\n  }\n\n  async function assertApprovalMutationAllowedByRunContext(\n    req: Request,\n    res: Response,\n    issue: { id: string; companyId: string },\n  ) {\n    const run = await loadActorRunContext(req, issue.companyId);\n    if (!run) return true;\n    if (!isStatusOnlyRecoveryContext(run.contextSnapshot)) return true;\n\n    res.status(403).json({\n      error: \"Status-only recovery runs cannot create or modify approvals\",\n      details: {\n        issueId: issue.id,\n        runId: run.id,\n        recoveryIntent: \"status_only\",\n        resumeRequiresNormalModel: true,\n      },\n    });\n    return false;\n  }\n\n  async function loadWorkProductRunAttribution(runId: string) {\n    return await db\n      .select({\n        id: heartbeatRuns.id,\n        companyId: heartbeatRuns.companyId,\n        agentId: heartbeatRuns.agentId,\n        agentCompanyId: agents.companyId,\n      })\n      .from(heartbeatRuns)\n      .innerJoin(agents, eq(heartbeatRuns.agentId, agents.id))\n      .where(eq(heartbeatRuns.id, runId))\n      .then((rows) => rows[0] ?? null);\n  }","sourceCodeStart":5186,"sourceCodeEnd":5222,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L5186-L5222","documentation":"409 guard in assertExplicitResumeIntentAllowed: the issue is cancelled and the request lacks a structured resume intent (resumeIntent !== true); cancelled issues can only be revived via the dedicated restore flow.","triggerScenarios":"Thrown at server/src/routes/issues.ts:5048 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.","Refer to the route's request validation in the named file and the shared validators for the accepted format."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}