|
2 | 2 |
|
3 | 3 | # Computer use |
4 | 4 |
|
5 | | -PostHog Code can give local agent sessions tools to see and control the macOS desktop across supported agent adapters. |
| 5 | +PostHog Code can give local agent sessions and cloud tasks tools to see and control the macOS desktop across supported agent adapters. |
6 | 6 |
|
7 | 7 | ## Enable it |
8 | 8 |
|
9 | 9 | 1. Open **Settings → Advanced**. |
10 | 10 | 2. Enable **Computer use**. |
11 | | -3. Start a new local session. |
| 11 | +3. Start a new local session or cloud task. |
12 | 12 | 4. Grant Screen Recording and Accessibility access when macOS requests it. |
13 | 13 |
|
14 | | -The setting applies when a session starts. Existing sessions are unchanged. |
| 14 | +The setting applies when a session or cloud task starts. Existing runs are unchanged. |
15 | 15 |
|
16 | 16 | ## Behavior |
17 | 17 |
|
18 | 18 | - Computer use is opt-in and disabled by default. |
19 | | -- It is available only to local sessions on macOS. |
| 19 | +- It is available to local sessions on macOS and cloud tasks created from the desktop app. |
20 | 20 | - Agents can capture the desktop, list visible applications, open or focus applications, click coordinates, type text, and press keys. |
21 | 21 | - Claude, Codex, and future adapters receive the same PostHog-owned MCP tools rather than adapter-specific computer-control implementations. |
22 | | -- Cloud sessions and unsupported operating systems do not receive the tools. |
| 22 | +- Cloud tasks relay computer actions back to the desktop app, which must remain open and connected for the run to keep using them. |
| 23 | +- Unsupported operating systems do not receive the tools. |
23 | 24 | - Tool calls use the existing MCP tool-call and approval pipeline. |
24 | 25 |
|
25 | 26 | ## Safety |
26 | 27 |
|
27 | 28 | - Review the screen before approving an action and verify the result after it runs. |
28 | 29 | - Do not ask an agent to enter passwords, tokens, recovery codes, or other secrets. |
29 | | -- Disable the setting and start a new session to remove the tools. |
| 30 | +- Cloud computer actions require approval on the connected desktop unless the action was allowed for the rest of that run. |
| 31 | +- Disable the setting before starting a new session or cloud task to omit the tools. Closing the desktop app disconnects computer use from active cloud tasks. |
30 | 32 | - Revoke access in **System Settings → Privacy & Security → Screen Recording** or **Accessibility** to prevent native control. |
31 | 33 |
|
32 | 34 | ## Scope |
33 | 35 |
|
34 | | -The initial implementation uses macOS system utilities for screenshots, application launching, mouse input, and keyboard input. It does not provide computer control to cloud tasks because those tasks do not run on the user's computer. Remote computer use would require an explicit device connection, user-presence controls, and a separate security design. |
| 36 | +The implementation uses macOS system utilities for screenshots, application launching, mouse input, and keyboard input. Cloud workers do not access the computer directly: PostHog Code designates a built-in MCP server for the cloud run, relays each request through the existing task command channel, and executes approved actions on the connected desktop. Relay designations are held in memory, so restarting the app disconnects active runs rather than silently reconnecting them. |
35 | 37 |
|
36 | 38 | ## Implementation |
37 | 39 |
|
38 | | -Computer actions are registered in the shared local-tools MCP registry. The Claude adapter exposes that registry through its in-process MCP server, while the Codex adapter exposes the same registry through its stdio MCP server. Session metadata gates the tools by environment, operating system, and the user's opt-in setting. |
| 40 | +Computer actions are registered in the shared local-tools MCP registry. The Claude adapter exposes that registry through its in-process MCP server, while the Codex adapter and cloud relay expose the same registry through the packaged stdio MCP server. Local session metadata and cloud run relay designations gate the tools by operating system and the user's opt-in setting. |
0 commit comments