Skip to content

web: expose screen recording on --platform web (agent-browser supports .webm, not surfaced by agent-device) #885

Description

@kacper-mikolajczak

Summary

On --platform web, agent-device record start/stop is unsupported - record is absent from WEB_SUPPORTED_COMMANDS, so web sessions cannot capture a screen recording. The managed backend (agent-browser) already supports native video recording (.webm), so this is about surfacing an existing backend capability through the agent-device web layer, not new recording plumbing. It mirrors how full-page screenshot + viewport were surfaced for web in #865.

Environment

  • agent-device: 0.17.10 (and main as of 2026-06-26)
  • agent-browser (managed backend): 0.27.x
  • Node: 24 (web backend)
  • Reproduced on macOS (local) and Ubuntu headless CI.

Current behavior

record is not part of the web capability surface:

  • src/core/capabilities.ts - WEB_SUPPORTED_COMMANDS = open, close, <query commands>, click, fill, focus, press, scroll, type, viewport; record is not included, so isCommandSupportedOnDevice is false for web.
  • The daemon recording handler has start branches only for ios-device / macos / ios-sim / android - no web branch - and returns UNSUPPORTED_OPERATION.
  • WebProvider exposes no record method.

So agent-device record start ./clip.mp4 --platform web is unsupported, while record works on Android (adb screenrecord) and iOS.

Proposed solution

Surface agent-browser's native recording through the web provider:

  • add record to WEB_SUPPORTED_COMMANDS;
  • implement start/stop recording on WebProvider (agent-browser-provider) delegating to agent-browser's native record start ./clip.webm / record stop;
  • add a web branch to the daemon recording handler.

Optionally normalize the output to MP4 for parity with the device record output.

Why / use case

We drive agent-device --platform web to verify and capture evidence for web app behavior. The mobile QA path records a video of each reproduction; the web path cannot, so an "always capture a clip" evidence convention can't hold on web - we currently fall back to screenshots only. Exposing the web video that agent-browser already produces would give web verify-runs the same temporal evidence as mobile, without scroll-and-stitch screenshot workarounds.

Notes

  • Related: fix: add web viewport control and screenshot aliases #865 surfaced full-page screenshot + viewport for --platform web using the same "expose an existing backend capability through the web layer" pattern.
  • Verification correctness is not blocked (we rely on snapshot / is / get); this is specifically about video evidence on web.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions