{"record":{"id":"7e6a63502ad053ea","repo":"paperclipai/paperclip","slug":"runtime-restart-backoff","errorCode":"runtime_restart_backoff","errorMessage":"Runtime restart backoff is active","messagePattern":"Runtime restart backoff is active","errorType":"http","errorClass":"ToolRuntimeSupervisorError","httpStatus":429,"severity":"error","filePath":"server/src/services/tool-runtime-supervisor.ts","lineNumber":320,"sourceCode":"        { reasonCode, companyCount, hostCount, maxCompanySlots, maxHostSlots },\n      );\n    }\n  }\n\n  function assertRestartAllowed(row: typeof toolRuntimeSlots.$inferSelect, metadata: Record<string, unknown>) {\n    const at = now();\n    const suppressedUntil = dateValue(metadata.restartSuppressedUntil);\n    if (suppressedUntil && suppressedUntil.getTime() > at.getTime()) {\n      throw new ToolRuntimeSupervisorError(\n        429,\n        \"Runtime restart storm suppression is active\",\n        \"runtime_restart_suppressed\",\n        { slotId: row.id, suppressedUntil: suppressedUntil.toISOString() },\n      );\n    }\n    const backoffUntil = dateValue(metadata.restartBackoffUntil);\n    if (backoffUntil && backoffUntil.getTime() > at.getTime()) {\n      throw new ToolRuntimeSupervisorError(\n        429,\n        \"Runtime restart backoff is active\",\n        \"runtime_restart_backoff\",\n        { slotId: row.id, backoffUntil: backoffUntil.toISOString() },\n      );\n    }\n  }\n\n  function restartMetadata(row: typeof toolRuntimeSlots.$inferSelect, metadata: Record<string, unknown>, reason: string) {\n    const at = now();\n    const windowStartedAt = dateValue(metadata.restartWindowStartedAt);\n    const inSameWindow = windowStartedAt && at.getTime() - windowStartedAt.getTime() <= restartStormWindowMs;\n    const restartCount = inSameWindow ? numberValue(metadata.restartCount) + 1 : 1;\n    const suppressed = restartCount > restartStormLimit;\n    const backoffMs = restartBackoffMs === 0\n      ? 0\n      : Math.min(restartBackoffMaxMs, restartBackoffMs * (2 ** Math.max(0, restartCount - 1)));\n    return {","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/tool-runtime-supervisor.ts#L302-L338","documentation":"assertRestartAllowed backoff: metadata restartBackoffUntil (set after a recent crash/exit) is still in the future, so an immediate restart attempt is refused with 429. Wait out the exponential backoff window; the slot will become restartable once the backoff expires.","triggerScenarios":"Thrown at server/src/services/tool-runtime-supervisor.ts:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restart backoff is active for this runtime. Wait for the backoff window to expire before retrying; investigate the repeated failure cause."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}