different-ai/openwork · error

Computer Use is Mac only and requires the OpenWork desktop a

Error message

Computer Use is Mac only and requires the OpenWork desktop app on macOS.

What it means

The Computer Use permission grant flow requires the desktop bridge (Electron native APIs) because it opens the macOS permission setup and parses a native permission result. When hasDesktopBridge() is false (web build, non-macOS, or bridge not injected), the mutation throws since Computer Use is only supported in the macOS desktop app.

Source

Thrown at apps/app/src/react-app/domains/settings/computer-use-config.tsx:113

    refetch,
  } = useQuery({
    queryKey: PERMISSIONS_QUERY_KEY,
    queryFn: async () => parsePermissionResult(await desktopBridge.checkComputerUsePermissions()),
    enabled: hasDesktopBridge(),
    retry: false,
    refetchOnWindowFocus: false,
  });

  // Opens the setup GUI; it returns a fresh read that becomes the cached state.
  const {
    mutate: grant,
    isPending: isGrantPending,
    error: grantError,
    reset: resetGrant,
  } = useMutation({
    mutationFn: async () => {
      if (!hasDesktopBridge()) {
        throw new Error("Computer Use is Mac only and requires the OpenWork desktop app on macOS.");
      }

      return parsePermissionResult(await desktopBridge.openComputerUsePermissionSetup());
    },
    onSuccess: (next) => {
      queryClient.setQueryData(PERMISSIONS_QUERY_KEY, next);
    },
  });

  const isBusy = isFetching || isGrantPending;
  const error = (grantError ?? checkError)?.message ?? result?.error ?? null;

  // Bubble the latest read up to the parent.
  useEffect(() => {
    if (result) {
      onPermissionsChange?.({ accessibility: result.accessibility, screenRecording: result.screenRecording });
    }
  }, [result, onPermissionsChange]);

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Use the OpenWork desktop app on macOS to configure Computer Use
  2. If on macOS desktop but still failing, restart the app — a failed preload can hide the bridge; check for preload errors in devtools
  3. Hide/disable the Computer Use section when hasDesktopBridge() is false instead of exposing a throwing action
  4. Verify the app build includes the computer-use bridge module

Example fix

// before
<button onClick={() => grantMutation.mutate()}>Enable Computer Use</button>
// after
{hasDesktopBridge() && (
  <button onClick={() => grantMutation.mutate()}>Enable Computer Use</button>
)}
Defensive patterns

Strategy: validation

Validate before calling

if (!hasDesktopBridge()) {
  toast.info("Computer Use requires the OpenWork macOS desktop app.");
  return;
}

Type guard

const hasDesktopBridgeGuard = (): bridge is DesktopBridge =>
  typeof window !== "undefined" && hasDesktopBridge();

Try / catch

try {
  await grantMutation.mutateAsync();
} catch (e) {
  if (e instanceof Error && e.message.includes("Mac only")) {
    toast.info("Open the OpenWork desktop app on macOS to enable Computer Use.");
  } else throw e;
}

Prevention

When it happens

Trigger: Clicking the grant/enable Computer Use permission button in ComputerUseConfig while hasDesktopBridge() returns false — e.g. running the web UI, Windows/Linux desktop, or the bridge failed to preload in Electron.

Common situations: User opens OpenWork in a browser and visits the Computer Use settings page; desktop app built/running on Windows or Linux; Electron preload script failed so window bridge is missing even on macOS.

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/3c6f4ffb2e5612d0. Report an issue: GitHub.