{"record":{"id":"298d273d04018889","repo":"paperclipai/paperclip","slug":"runtime-slot-not-found","errorCode":"runtime_slot_not_found","errorMessage":"Runtime slot not found","messagePattern":"Runtime slot not found","errorType":"http","errorClass":"ToolRuntimeSupervisorError","httpStatus":404,"severity":"error","filePath":"server/src/services/tool-runtime-supervisor.ts","lineNumber":781,"sourceCode":"      return rows\n        .filter((row) => ACTIVE_SLOT_STATUSES.includes(row.status))\n        .map(slotView);\n    },\n\n    async stopSlot(input: {\n      companyId: string;\n      slotId: string;\n      runId?: string | null;\n      agentId?: string | null;\n      reason?: string;\n    }): Promise<ToolRuntimeSlotView> {\n      const [row] = await db\n        .select()\n        .from(toolRuntimeSlots)\n        .where(and(eq(toolRuntimeSlots.companyId, input.companyId), eq(toolRuntimeSlots.id, input.slotId)))\n        .limit(1);\n      if (!row) {\n        throw new ToolRuntimeSupervisorError(404, \"Runtime slot not found\", \"runtime_slot_not_found\", { slotId: input.slotId });\n      }\n      if (row.runtimeKind !== \"local_stdio\") {\n        throw new ToolRuntimeSupervisorError(\n          422,\n          \"Runtime slot control is only supported for local stdio slots\",\n          \"runtime_control_unsupported\",\n          { slotId: row.id, runtimeKind: row.runtimeKind },\n        );\n      }\n      const at = now();\n      const [stopped] = await db\n        .update(toolRuntimeSlots)\n        .set({\n          status: \"stopped\",\n          stoppedAt: at,\n          idleDeadlineAt: null,\n          idleExpiresAt: null,\n          healthStatus: \"ok\",","sourceCodeStart":763,"sourceCodeEnd":799,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/tool-runtime-supervisor.ts#L763-L799","documentation":"stopSlot company-scoped lookup: no toolRuntimeSlots row exists for the slotId within the requesting company. The 404 fires before any control action, covering deleted slots, stale ids, and cross-tenant access attempts.","triggerScenarios":"Thrown at server/src/services/tool-runtime-supervisor.ts:781 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the runtime slot ID; the slot may have been reclaimed. List active runtime slots and use a current one."],"exampleFix":null,"handlingStrategy":"validation","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"}