Video capture
Cairntrace records native WebM video with the Playwright backend. The agent-browser and mock backends do not record video, and Cairntrace does not build a synthetic video from screenshots.
Record a Playwright run
Enable video in the spec and run it with Playwright:
artifacts:
capture:
video: always
video:
slowMo: 250
speed: 1cairn run flows/checkout.yml --backend playwrightA retained recording is written to videos/playwright-video.webm. slowMo delays browser actions so short interactions remain visible. speed changes playback speed during post-processing and requires ffmpeg.
Capture policy controls retention:
alwayskeeps video for passing and non-passing runs.on-failureremoves the video after a passing run.neverdisables recording and is the default.
Check Playwright readiness
Install the package dependencies and the matching Chromium build:
bun install
bunx playwright install chromium
cairn doctor --format mdDoctor reports playwright-package and playwright-chromium separately. This distinguishes a missing dependency install from a missing or non-executable browser binary.
Use screenshots on agent-browser
When you use agent-browser, capture screenshots directly:
artifacts:
capture:
screenshots: always
video: neverScreenshots are written as screenshots/<step-ordinal>_<step-id>.png. If video is requested on a backend without recording support, Cairntrace writes a warning to events.ndjson and continues the run without a video file.
Audit and clips
cairn audit forces the Playwright backend and video capture, then can run vidtrace extraction under videos/vidtrace/. cairn clip cuts labelled segments from an existing retained video; it cannot create a source video for a run that did not record one.
See also
- Artifacts — exact run-directory layout and redaction boundary
- Clip — cut labelled segments with vidtrace
- Investigate and audit — one-command video evidence and code connection
- Doctor and clean — Playwright package and Chromium readiness checks