Two AI Agents, One Browser: The Race Condition Behind Computer Use
Description and use
Concurrent AI agents in a browser can cause race conditions. Mac MCP mitigates this with stable tab handles, explicit coordination, background‑safe actions, and structured outcome states.
Problem
Concurrent AI agents interacting with the same browser can cause race conditions, leading to incorrect actions, lost state, and user confusion.
Outcome
By treating tab positions as non‑identifiers, coordinating shared resources, and distinguishing background actions, Mac MCP reduces race conditions and improves reliability of multi‑agent desktop automation.
Workflow
- 1. Agent opens a tab and performs an action using a stable tab handle.
- 2. A second agent may open, close, or reorder tabs, potentially changing the tab’s position.
- 3. Agents coordinate on shared resources (e.g., forms) to avoid concurrent writes.
- 4. Background‑safe tools target tabs without switching focus, preserving user attention.
- 5. After an action, the system reports three states: action attempted, outcome observed, outcome uncertain.
- 6. Tests deliberately trigger interruptions (tab reorder, close, concurrent writes) to validate robustness.
Evidence
An array position was used as if it were a durable resource identifier.
Stable handles solve one problem, but they don't resolve concurrent writes.
Mac MCP's ordinary Safari and Chrome browser work is designed to target background tabs without switching the user's active tab.
I try to keep three different states separate: Action attempted, Outcome observed, Outcome uncertain.
The most useful tests for this kind of tool are deliberately awkward: Open, close, and reorder tabs during an agent action.
- Record date: 2026-10-09T19:41:02.733Z