Skip to content

Playwright fix brief, 2026-06-10

Worker brief for the playwright-fix spawn. Goal: root-cause and fix the broken Playwright setup on Console, or recommend a replacement if it truly cannot work.

Symptom

Any run of /home/justinwieb/forge/scripts/forge_sites_screenshot.sh "http://127.0.0.1:8096/" dies with:

Exception: Connection.init: Connection closed while reading from the driver
  (playwright/_impl/_connection.py, line 559)

Reproduced 3x on 2026-06-10, including with sandboxing disabled. Venv: ~/.forge-venvs/assets/ (python3.12).

Tasks

  1. Root-cause it. Likely suspects, in order:
  2. Playwright's bundled Node driver binary vs Console's CPU lacking AVX2. See Console AVX2 constraint: the npm-bundled claude binary SIGILLs on this CPU for exactly this reason. Check dmesg/exit signals for SIGILL from the driver node binary (~/.forge-venvs/assets/lib/python3.12/site-packages/playwright/driver/node).
  3. Stale/missing browser install (playwright install chromium).
  4. Driver/package version mismatch after a pip upgrade.
  5. Inventory consumers. Known: /screenshot (forge_sites_screenshot.sh), asset-grabber pipeline (reference_asset_grabber). Grep scripts/, .claude/skills/, ~/.claude/skills/ for playwright imports/usages to confirm the full list (check the /browser stream tooling too).
  6. Fix root-cause, no band-aids (doctrine 9.5). If the driver node binary is the AVX2 problem, the known-good pattern from the Console constraint memo is swapping in a system/non-AVX2 node; check how that fix was applied for claude and mirror it (e.g. replace the driver node with a symlink to a working node of a compatible major version).
  7. Verify end-to-end: run the screenshot script against http://127.0.0.1:8096/ and confirm desktop + mobile PNGs land in forge/logs/site-screenshots/. Then run one asset-grabber smoke if cheap.
  8. Only if unfixable on this CPU: evaluate alternatives per consumer (plain chromium --headless=new --screenshot, or driving the existing headed Chrome on Xvfb from the /browser stream, reference_browser_stream). Recommend, don't swap, until Playwright is confirmed dead.

Deliverables

  • Fix committed (scripts only; venv changes documented, not committed).
  • Findings handoff: memory/handoffs/playwright-fix-2026-06-10.md.
  • Update reference_asset_grabber.md / screenshot skill docs if behavior changed.
  • /notify normal "playwright-fix done" "<one-line outcome>" when finished.

[Claude Code, 2026-06-10]