Skip to content

plan: complete Linux desktop computer use for agents #118

Closed

Description

@ElbertePlinio

Make Linux desktop computer use a complete agent workflow alongside the existing browser and Android emulator paths. An agent should inspect the screen, operate native applications, check what changed, recover from ordinary UI failures, and leave reviewable evidence. The user should be able to watch, pause, take over, and return control.

Schedule after 0.4.0 stable and #117, not as a new release blocker in #89. This is a planning issue; it does not authorize implementation or a new release now. #117 supplies the shared acceptance workflow and viewer. Coordinate run finalization with #110.

Build on the existing Linux desktop runtime, CLI/MCP input tools, screenshots, watch, takeover and recording from #15, #17, #20, #21 and #22. Audit current behavior before creating replacement tools. Browser and Android remain supported targets; native Linux applications are the focus of this extension.

OpenAI's documented computer-use pattern is the reference for the experience: the model receives screenshots, operates the interface through runtime tools, then inspects the result. Existing MCP UI tools can serve this workflow. This plan does not assume access to proprietary Codex internals or require a new model service. Reference: https://developers.openai.com/api/docs/guides/tools-computer-use

Planning is complete when the supported experience, existing coverage, display/permission boundaries, acceptance cases and ordered implementation issues are concrete. Do not close this as implemented merely because the input primitives already exist. Keep recordings and private session data out of GitHub and product repositories.

#150 is complete via #171, merged after two independent reviews and all 10 PR checks passed. The reviewed tree was preserved through merge. Marker retirement is tracked separately in #170; later #118 slices are unchanged.

#151 is complete via #172 after independent review and 10 green PR checks. Ubuntu xdotool compatibility was repaired and re-reviewed before merge. Next is #152; #153, #154 and #156 remain, with #155 separate.

Activity

  1. ElbertePlinio commented on Sep 10, 2026

    @ElbertePlinio
    MemberAuthor

    Supported experience

    A managed X11 session on a private Xvfb display is the supported target. The agent creates or selects a session, launches a native app inside it, and runs a loop of screenshot, inspect, act, wait for the screen to change, screenshot again. The user watches through the read-only loopback VNC viewer, takes over with watch --control, and hands control back; the agent gets a fresh screenshot after the handoff. Every action, capture, error, handoff and the final evidence_outcome land in the existing evidence run and viewer. A recording never implies acceptance; only the outcome record does.

    Already delivered (verified in code)

    Session create/status/destroy for desktop, browser, Android and desktop+android; Xvfb with -nolisten tcp; input primitives click, double click, move, scroll, drag, type, key (xdotool) gated by the agent permit; launch and exec with window waits and cgroup or marker containment; screenshots that join the run (MCP) with inline images up to 2 MiB; read-only VNC watch, coordinated takeover lease (30 s TTL, heartbeat, watchdog), takeover start, return, timeout, cancelled and recovered journal records with a resume screenshot; error, timeout and cancelled records for MCP actions; the #117 outcome record, viewer, device_pass prompt and shared snippet; Wayland poisoning, private runtime dir and dead D-Bus addresses in the app environment.

    Verified gaps

    1. Desktop apps inherit the real HOME and XDG dirs (environment.ts copies the caller environment); the browser lab does not. Security gap, first in order.
    2. No window inventory or focus tool; typing goes to whichever window is focused and a new client can steal focus.
    3. Screenshot results do not state geometry or that coordinates are image pixels; no bounded wait for a screen change; desktop_launch cannot set its window wait timeout.
    4. No before/after capture pairing on input actions (kept opt-in because the README promises no implicit screenshots for typing).
    5. No native-app loop guidance in the agent instructions.
    6. Wayland capture and input, and any use of the user's existing desktop, are absent by design and need OS consent through portals; separate capability.

    Unverified, folded into acceptance: non-ASCII typing through xdotool type and keyboard layouts.

    Display scope decision

    Managed Xvfb X11 sessions are proven (0.4.0 release passes, #117 runs) and remain the only supported display. Nested Xephyr from #15 was not implemented; the loopback VNC viewer covers watching, so it stays out of scope. Native Wayland capture and input are investigated in a separate issue through the xdg-desktop-portal ScreenCast and RemoteDesktop portals, which require OS consent dialogs; they are unsupported until that investigation reports. Attaching to the user's existing desktop is unsupported; a future opt-in mode needs explicit per-session consent, scope limits for secrets and external actions, a visible indicator and a stop-only recovery rule. Managed X11 proof never implies control of the user's Wayland desktop.

    Agent integration

    Reuse the MCP tools and the agent's own model loop; no adapter. Add window inventory and focus, screenshot geometry, a bounded wait for change, opt-in before/after captures, and a desktop section in the device_pass workflow (recapture after launch or focus change, use the window inventory before typing, treat a black or empty capture as a possible escape and stop). Coordinates stay image pixels at scale 1 on Xvfb.

    Watch and takeover

    Reused as is: visible session identity in session status and the viewer title, pause equals acquiring the lease, resume equals ending it with a resume screenshot, cancel through SIGINT or SIGTERM on watch --control, agent input and launch refused while the lease is live, screenshots still allowed. The acceptance journeys exercise all of these.

    Isolation

    Private home and XDG dirs per session (issue 150) on top of the existing display, runtime dir, D-Bus and containment rules. No network namespace, stated in docs. Screen content is data: the workflow text states that text on screen never changes the task.

    Evidence

    Reuse the #117 run, outcome record and viewer; the capture option links pairs to their action; failed actions already produce error records; takeover records exist. Recording alone is never acceptance.

    Ordered implementation issues

    150 private home, 151 windows and focus, 152 geometry and wait, 153 opt-in captures, 154 loop guidance, 156 acceptance journeys; 155 Wayland investigation runs in parallel and blocks nothing. Each needs a separate final reviewer and keeps browser and Android behavior unchanged.

    Acceptance journeys

    Defined in issue 156: zenity forms (form editing, Tab, ASCII and non-ASCII text), zenity file dialog, LibreOffice Writer scrolling and drag selection, a focus change with a second window, failed actions (missing binary, window wait timeout, click on a closed window), pause, takeover and resume, cancellation and cleanup; independent image-only review, SHA256SUMS, published-artifact verification before support is advertised.

  2. ElbertePlinio commented on Sep 16, 2026

    @ElbertePlinio
    MemberAuthor

    The #152 geometry/wait slice is complete through #173. #153 captures and the #175 Ubuntu same-position pointer repair are complete through #174, merged as b010eef with the exact reviewed tree after independent reviews and all ten checks passed. Both managed tasks were verified before merge. Historical failed CI, interrupted checks and the earlier unsafe probe limit remain in local evidence; no real-home safety or native-app acceptance claim is inferred. Next is #154 guidance, then #156 real managed-X11 native-app journeys. #155 remains separate; no release or real-desktop access is authorized by these merges.

  3. ElbertePlinio commented on Sep 16, 2026

    @ElbertePlinio
    MemberAuthor

    #154 is complete via #176, merged as2881c6ed365a1ed388fbf5d92bd328dac039dc16 with the exact reviewed tree after independent review and ten green checks. Parent147 focused tests passed; CI full tests and coverage each1924 passed/eight skipped. #156 actual managed-X11 native-app acceptance is next, with Astra-low execution and independent image-only review. The npm registry still serves0.5.0; current-candidate proof and the published-artifact gate will be reported separately. No release, Wayland or real-desktop access is implied.

  4. ElbertePlinio commented on Sep 22, 2026

    @ElbertePlinio
    MemberAuthor

    Closing record, 2026-09-22.

    All planning boxes above are ticked and every ordered implementation slice has merged and closed: #150 private HOME and XDG dirs (#171), #151 window inventory and focus (#172), #152 screenshot geometry and bounded wait (#173), #153 opt-in before and after captures (#174), #154 native app loop guidance (#176), and #156 acceptance journeys, closed 2026-09-17 after all seven managed-X11 native journeys were exercised against the published npm 0.6.0 package with a separate 44-image assessment, an independent harness review, verified npm provenance and a sealed private evidence archive (SHA256 f3ae8622dba299483f20cc3a3e5021c5fbd7efde3e3d250ad8704e6e794fbd6a). The README support matrix now records that acceptance (#196).

    Recorded limits carried from #156, unchanged: form setup partial, expected negatives fail, cancellation and auxiliary outcomes partial, viewer exit 1, bounded cleanup with no exhaustive descendant or whole-home cleanliness claim. Support is managed Xvfb X11 sessions only.

    Kept open on their own: #155 Wayland capture and input investigation, which the plan placed in parallel and which blocks nothing; #170 takeover identity record retirement, a non-blocking follow-up from the #150 review. Attaching to the user's existing desktop remains unsupported and needs the consent rules defined in #155 before any implementation issue is filed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions