Lifan Chen faster-mac-use v0.1.0 (MIT)

Background computer use for macOS that never touches your cursor.

faster-mac-use (fmu) gives Claude Code, OpenAI Codex, Cursor, and custom MCP agents a single 268-token tool that drives unfocused Chrome "๐Ÿค– Agent" tab groups and native macOS apps in parallel, while you keep typing and clicking in the foreground.

Audited at 50Hz via CoreGraphics & lsappinfo
0.0 px / 0 focus
10-op SaaS workflow (vs. 231,125 in @playwright/mcp)
1,290โ€“2,024 tok
25-op parallel multi-cursor swarm across Web + Mac
256 ms / 3 agents
git clone https://github.com/lifan-builds/faster-mac-use.git && cd faster-mac-use && pip install -e .

5-Workload Competitor Benchmark Explorer (o200k_base)

Measured across 5 realistic web, native macOS, hybrid, multi-agent, and 30-step long-horizon workloads against 15 closed-source and open-source configurations. Select any workload and metric below to inspect the exact numbers from benchmarks/results/latest_benchmark.json.

Workload A โ€” Enterprise SaaS Console (10 UI Operations, 140+ Controls)

Lower is better (OpenAI o200k_base tokenizer)

System Mode Schema Turns Raw Obs Peak Ctx Cum. Tok Engine Est. E2E BG Safe TabGrp Mac AX Swarm

How the 3-Tier Engine Eliminates Context Bloat and Focus Theft

In an LLM tool loop of N turns where each step appends a snapshot of size S, total billed input tokens grow quadratically as ยฝยทNยฒยทS. faster-mac-use attacks both factors simultaneously: collapsing N via a stateful cua_repl sandbox and shrinking S via persistent UIDs, pre-registered table folding, and stale-observation masking.

Tier 1: Browser Engine & Tab Groups

  • Unfocused "๐Ÿค– Agent" Tab Groups: Opens and groups tabs with active: false via extension/background.js and a thread-safe Playwright worker that never triggers Chrome 144+'s DevToolsActivePort modal popup.
  • Background Focus Emulation: Enables CDP Emulation.setFocusEmulationEnabled and Page.setWebLifecycleState("active") so document.hasFocus() === true and 60fps timers run while you work in another app.
  • Pre-Registered Table Folding: Assigns persistent WeakMap @u1..@uN UIDs and folds dense <tbody> rows beyond the first 6 while indexing all rows in uidToRef, cutting initial snapshots from 1,520 to 804 tokens while keeping folded rows directly clickable by label or UID.
  • WebMCP & Zero-Dialog File Uploads: Auto-detects navigator.modelContext tools (tab.callTool) and intercepts <input type="file"> via DOM.setFileInputFiles so NSOpenPanel never steals focus.

Tier 2: Native Swift AX & Vision OCR

  • Persistent Unix Socket Daemon (/tmp/fmu-ax.sock): Compiled Swift binary (fmu_ax.swift) maintains a 4,000-element AXUIElement LRU cache, PID/window cache, and per-agent diff baselines across turns.
  • Batched AX Reads & Lazy Wakeup: Fetches attributes with AXUIElementCopyMultipleAttributeValues and sets AXManualAccessibility = true only on target background PIDs (waking Electron/Chromium AX trees without VoiceOver).
  • Zero-Focus Background Actions: Executes AXPress → AXConfirm → background CGEvent.postToPid click fallback plus 16-char UTF-16 batched keystrokes without raising windows.
  • 0-Token Apple Silicon Window OCR: Built-in CGWindowListCreateImage + VNRecognizeTextRequest fallback (await app.ocr()) reads GPU/canvas windows in <70 ms with zero LLM vision tokens.

Tier 3: Multi-Cursor REPL & Context Guard

  • 268-Token Single-Tool Schema: Supports OpenAI Codex-style stateful cua_repl scripts (cua.createBrowserTab, cua.getApp, cua.getCursors), 1-trip declarative steps batches, and concurrent {"parallel": [...]} swarms.
  • Per-Agent Virtual Cursors: Each agent ID (agent-1, agent-2, ...) gets an isolated AgentSession, independent DOM/AX diff baseline, and independent virtual cursor coordinates (tab.moveCursor / app.moveCursor).
  • Stale-Observation Masking: ContextWindowTracker replaces superseded full snapshots from earlier turns with 18-token tombstones, keeping 30-step peak context at 1,320 tokens.
  • 50Hz Intrusion Guard: Polls CoreGraphics (CGEventGetLocation + CGEventSourceSecondsSinceLastEventType) and lsappinfo front to prove 0.0 px physical cursor movement.

Broader Market Comparison & Material Boundaries

Computer-use tools in 2026 fall into four architectural generations. Here is where faster-mac-use wins against the broader market and the exact platform boundaries to keep in mind (read the full market & GTM brief).

Where faster-mac-use Wins Across the 4 Generations

  • vs. Gen 1 Pixel Screenshot Loops (Anthropic computer tool, Operator): Pixel loops capture full-screen images every step (83kโ€“620k cumulative tokens) and hijack the physical Mac cursor unless isolated in a VM. fmu operates directly on your host Mac in the background at 0.0 px drift and 40ร—โ€“135ร— lower token cost.
  • vs. Gen 2 Verbose Browser/OS MCPs (@playwright/mcp, chrome-devtools-mcp, open-computer-use): Standard MCPs charge a 1,508โ€“12,592 token schema tax every turn and dump full ARIA trees on every click (143kโ€“231k tokens on Workload A). fmu uses a 268-token schema and returns compact +/~/- UID diffs (2,024 tokens).
  • vs. Gen 3 Single-Surface Ref CLIs (vercel-labs/agent-browser, @playwright/cli, Peekaboo, trycua/cua): Sequential ref numbering suffers index-shift diff avalanches when banners insert at the top of the DOM, and separate web vs. Mac tools cannot coordinate in one turn. fmu unifies Chrome and native macOS AX with persistent WeakMap / CFHash UIDs.
  • vs. Gen 4 Single-Session REPLs (OpenAI Codex cua_repl): Codex's cua_repl is the strongest closed-source design, but serializes multi-agent UI work into a single session. fmu adds true multi-cursor parallel swarms (cutting 3-agent 25-op tokens by 10.5ร— and engine time by 3.7ร—), pre-registered table folding, and 0-vision-token Apple Silicon Window OCR as an open-source MCP and CLI for any agent.

Material Limitations & Scope Boundaries

  • macOS-first native tier: The compiled Swift accessibility and Vision OCR daemon (src/native/fmu_ax.swift) requires macOS (Apple Silicon / macOS 14+ recommended) with Accessibility permission granted to your terminal or host IDE.
  • Chrome Tab Group extension boundary: Creating color-coded "๐Ÿค– Agent" tab groups inside your primary visible Chrome window uses the included MV3 extension (extension/) because chrome.tabGroups is an extension-only API. Without the extension loaded, fmu runs out-of-the-box in an isolated background Chromium worker with CDP Focus Emulation and zero popups.
  • Minimized window OCR: While AXUIElement reads and AXPress actions work on minimized and off-Space windows, macOS unloads pixel backing stores for windows minimized to the Dock, so app.ocr() requires the window to be unminimized (it can remain completely occluded behind other windows).

Quick Start & MCP Client Configuration

Install locally in under a minute and connect fmu to Claude Code, OpenAI Codex CLI, Cursor, Antigravity, or invoke it directly from shell scripts and skills.