paperclipai/paperclip · error · ToolRuntimeSupervisorError

runtime_slot_not_found

runtime_slot_not_found

Error message

Runtime slot not found

What it means

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.

Source

Thrown at server/src/services/tool-runtime-supervisor.ts:781

      return rows
        .filter((row) => ACTIVE_SLOT_STATUSES.includes(row.status))
        .map(slotView);
    },

    async stopSlot(input: {
      companyId: string;
      slotId: string;
      runId?: string | null;
      agentId?: string | null;
      reason?: string;
    }): Promise<ToolRuntimeSlotView> {
      const [row] = await db
        .select()
        .from(toolRuntimeSlots)
        .where(and(eq(toolRuntimeSlots.companyId, input.companyId), eq(toolRuntimeSlots.id, input.slotId)))
        .limit(1);
      if (!row) {
        throw new ToolRuntimeSupervisorError(404, "Runtime slot not found", "runtime_slot_not_found", { slotId: input.slotId });
      }
      if (row.runtimeKind !== "local_stdio") {
        throw new ToolRuntimeSupervisorError(
          422,
          "Runtime slot control is only supported for local stdio slots",
          "runtime_control_unsupported",
          { slotId: row.id, runtimeKind: row.runtimeKind },
        );
      }
      const at = now();
      const [stopped] = await db
        .update(toolRuntimeSlots)
        .set({
          status: "stopped",
          stoppedAt: at,
          idleDeadlineAt: null,
          idleExpiresAt: null,
          healthStatus: "ok",

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Verify the runtime slot ID; the slot may have been reclaimed. List active runtime slots and use a current one.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/tool-runtime-supervisor.ts:781 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/298d273d04018889. Report an issue: GitHub.