Skip to content

feat(computer-use): replace desktop tools with scoped native sessions - #4463

Merged
benjaminshafii merged 8 commits into
devfrom
feature/computer-use-sessions
Sep 6, 2026
Merged

benjaminshafii merged 8 commits into
devfrom
feature/computer-use-sessions

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Computer Use currently mixes semantic window operations with whole-screen input, optional freshness checks, model-controlled strict-mode changes, and clipboard access. This replaces the desktop integration with a standalone native session runtime: the person approves an exact app, selects a window, and chooses read-only, accessibility, or foreground mouse/keyboard scope.

Resulting behavior

  • New @openwork/computer-use package with six MCP session tools, public macOS Accessibility and ScreenCaptureKit APIs, and no dependency on the HandsFree or voice runtime.
  • Native per-session app/window consent and a persistent Pause / Resume / Stop panel. Grants expire after 15 minutes; idle sessions pause; control is exclusive across helper processes. Only the person can resume.
  • Mandatory short-lived observations, exact app/window/element identity, semantic-content checks, visual-image freshness, image-to-window coordinate mapping, and per-event foreground validation.
  • Request-ID receipts prevent duplicate input after a lost reply. An action reports dispatch separately from verified outcome; uncertain and partial actions require another observation.
  • Window-only capture and omission/masking of standard protected fields. No whole-screen, clipboard, shell, automatic-permission, model-controlled scope escalation, or global-HID fallback tools.
  • Provider-independent JavaScript session client for persistent orchestration. It handles observation sequencing, cancellation and cleanup without a separate inference loop or API credentials.
  • Redesigned Library setup, updated app mentions, bundled-helper version detection, reconnect/migration guidance and user documentation. Existing helper bundle identity and executable location are retained.

This is a macOS 14+ preview. Windows/Linux backends, locked use, persistent app grants and background mouse/keyboard operation are not included. The native boundary does not sandbox what an approved app itself can do; action authorization and untrusted-content handling remain responsibilities of the calling host. Exact visual-image matching can reject animation or caret changes.

The package README contains the architecture, protocol, model/orchestration strategy, limitations and primary design sources: runtime design.

Takeover fixes

Pausing immediately releases held pointer input, and drag cleanup cannot send a second release. Session status explains why control paused and requires human takeover. The native journey explicitly changes the window picker from the unapproved window to the approved one, checks manual typing and fresh observations after Resume, and interrupts a real drag before Stop.

Native compatibility fixes

Live Mac verification found and fixed missing process start identities for directly launched apps, transient disagreement between Accessibility and WindowServer during opening animation, and pointer events with missing window-local coordinates. Pointer dispatch uses an isolated, availability-checked private CGEventSetWindowLocation compatibility hook; this OS dependency is documented and fails explicitly if unavailable. Foreground, hit-test, consent and per-event checks remain enforced.

Verification — Passed

Head: 8702cacdcfce95ceaa5e9c6f90e5fcd5d3c1852e.

  • pnpm evals:e2e computer-use-window-scope --local — exit 0; 1 passed, 0 failed, 0 skipped. Printed placement: placement: local (--local).
  • The real Mac journey proves nondefault window selection, identity discovery, connection/window isolation, protected-field omission, actual edits, receipt replay, stale-observation rejection, automatic takeover from typing, native resume with a fresh view, pointer release during an interrupted drag, and Stop.
  • Exact-head Passed evidence is published in the sticky test-evidence comment.
  • pnpm --filter @openwork/computer-use check — four native boundary tests pass; JavaScript syntax checks pass.
  • pnpm --dir evals typecheck:spec-layer and git diff --check pass.

All CI checks are green on this head, and automatic squash merge is enabled. Merge still requires eligible reviewer approval: automatic clearance requires human review for the macOS alpha workflow path-filter change. Platform coverage beyond this Mac, packaged permission migration and provider task-success benchmarking remain separate work.

@mintlify

mintlify Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Sep 4, 2026, 11:09 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@vercel

vercel Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
openwork-app Ignored Ignored Preview Sep 6, 2026 7:28pm UTC
openwork-den Ignored Ignored Preview Sep 6, 2026 7:28pm UTC
openwork-diagnostics Ignored Ignored Preview Sep 6, 2026 7:28pm UTC
openwork-landing Ignored Ignored Preview Sep 6, 2026 7:28pm UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: d5c77d9
Status: ✅  Deploy successful!
Preview URL: https://b0c7884c.openwork.pages.dev
Branch Preview URL: https://feature-computer-use-session.openwork.pages.dev

View logs

@vercel
vercel Bot temporarily deployed to Preview – openwork-landing September 5, 2026 19:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 5, 2026 19:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 5, 2026 19:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-den September 5, 2026 19:54 Inactive
Comment thread evals/worlds/computer-use.ts Resolved
@benjaminshafii

Copy link
Copy Markdown
Member

Test evidence — computer-use-respects-window-consent-fresh-observations-and-the-person-s-stop-co — ✅ passed

SHA 8702cac · engine v1

✅ passed · 0 expectations passed · 0 failed · 0 pending

steps 1 ✅ Discovery exposes identities without window content or input access (0.0s) · 2 ✅ The person chooses a window and grants app controls (1.1s) · 3 ✅ A different connection cannot read or act through the grant (0.0s) · 4 ✅ Only the approved window is read and its protected field is omitted (0.2s) · 5 ✅ Accessible actions update the selected window once and leave the other window alone (0.3s) · 6 ✅ A resized window and a paused session reject old observations (0.2s) · 7 ✅ A person's typing pauses control until they explicitly resume with a fresh view (0.6s) · 8 ✅ Stop revokes the session immediately and leaves both windows intact (0.0s) · 9 ✅ Pausing an in-flight drag releases the pointer and never resumes the old path (1.4s)
verdict passed · 0 user observations · 0 probes · steps 9/9


Test run created 2026-09-06T19:28:03.944Z · Source: evals/results/test-runs/2026-09-06T19-28-03-939Z-computer-use-respects-window-consent-fresh-observations-and-the-person-s-stop-co/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4463 --test-run 2026-09-06T19-28-03-939Z-computer-use-respects-window-consent-fresh-observations-and-the-person-s-stop-co

@benjaminshafii
benjaminshafii enabled auto-merge (squash) September 6, 2026 19:32
@benjaminshafii
benjaminshafii merged commit ec5a745 into dev Sep 6, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants