{"record":{"id":"5d9fd5b408fa1009","repo":"paperclipai/paperclip","slug":"runtime-capacity-unavailable","errorCode":"runtime_capacity_unavailable","errorMessage":"No local stdio runtime capacity is currently available","messagePattern":"No local stdio runtime capacity is currently available","errorType":"http","errorClass":"ToolRuntimeSupervisorError","httpStatus":429,"severity":"error","filePath":"server/src/services/tool-runtime-supervisor.ts","lineNumber":298,"sourceCode":"    if (companyCount >= maxCompanySlots || hostCount >= maxHostSlots) {\n      const reasonCode = companyCount >= maxCompanySlots ? \"runtime_company_capacity_exhausted\" : \"runtime_host_capacity_exhausted\";\n      await writeAudit({\n        companyId: input.companyId,\n        runId: input.runId,\n        issueId: input.issueId,\n        agentId: input.agentId,\n        action: \"runtime_deferred\",\n        outcome: \"failure\",\n        reasonCode,\n        details: {\n          slotKey: input.slotKey,\n          companyCount,\n          hostCount,\n          maxCompanySlots,\n          maxHostSlots,\n        },\n      });\n      throw new ToolRuntimeSupervisorError(\n        429,\n        \"No local stdio runtime capacity is currently available\",\n        \"runtime_capacity_unavailable\",\n        { 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      );","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/tool-runtime-supervisor.ts#L280-L316","documentation":"assertCapacity limit: the number of live runtime slots for the company or host reached maxCompanySlots/maxHostSlots. A runtime_deferred audit event names which bound tripped, and the 429 runtime_capacity_unavailable tells the caller to back off — slots free up as idle processes exit; retry later rather than spawning more.","triggerScenarios":"Thrown at server/src/services/tool-runtime-supervisor.ts:298 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No stdio runtime slots are free. Wait for running runtimes to finish or increase configured runtime capacity."],"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-14T00:17:10.932Z"}