Summary
The claude-in-chrome browser tool can capture screenshots, but it can't hand the resulting file to a shell-based step (like the github-screenshots skill's upload.sh). This is why the new capture.sh uses headless Playwright as its default engine rather than the Chrome extension.
Observed behavior (tested)
Calling the capture tool with save_to_disk: true:
- The tool result contains only a capture ID (e.g.
ss_6932odiqo) and the inline rendered image — no file path, despite the tool's documented contract ("Returns the saved path in the tool result").
- A filesystem scan immediately after finds no image written anywhere the shell can reach (checked broadly,
-newermt "-90 seconds").
So the capture comes back as an inline blob to the agent, not as a file in the filesystem where upload.sh runs.
Two root causes (they point different directions)
- Missing-path string — possibly a temporary integration gap (path not surfaced in this harness). Could be fixed.
- No shell-reachable file — likely architectural: the extension drives the user's real Chrome and the capture lives on the browser side, while shell tools (
Bash, upload.sh) run in the agent environment. Even if (1) is fixed, the returned path may not be readable by the shell.
Impact / current decision
scripts/capture.sh defaults to Playwright (headless Chromium) because it runs in the same environment as upload.sh and deterministically writes a path the script owns. The Chrome extension is not a drop-in fallback — it returns an inline image, not a file.
This matters because the Chrome extension has a unique strength we want: it drives the user's real, authenticated session, which would let us screenshot signed-in pages without standing up local auth. Playwright (headless, no session) can't do that; today's extension can't produce a file. Neither covers "capture a signed-in page → upload" alone.
Asks (either unlocks the extension for scripted pipelines)
save_to_disk returns an absolute path and writes to a shell-reachable location; or
- a tool/option that returns the raw image bytes (base64) so the agent can write the file itself.
With either, capture.sh can grow an --engine chrome|playwright switch — Chrome chosen specifically when an authenticated session is needed, Playwright otherwise.
Repro
navigate to any URL via claude-in-chrome.
computer action screenshot with save_to_disk: true.
- Observe: result has an
ss_… ID, no path; no file appears on disk.
Filed from an agent session that hit this while screenshotting a signed-in page for buildinternet/either#280.
Summary
The
claude-in-chromebrowser tool can capture screenshots, but it can't hand the resulting file to a shell-based step (like thegithub-screenshotsskill'supload.sh). This is why the newcapture.shuses headless Playwright as its default engine rather than the Chrome extension.Observed behavior (tested)
Calling the capture tool with
save_to_disk: true:ss_6932odiqo) and the inline rendered image — no file path, despite the tool's documented contract ("Returns the saved path in the tool result").-newermt "-90 seconds").So the capture comes back as an inline blob to the agent, not as a file in the filesystem where
upload.shruns.Two root causes (they point different directions)
Bash,upload.sh) run in the agent environment. Even if (1) is fixed, the returned path may not be readable by the shell.Impact / current decision
scripts/capture.shdefaults to Playwright (headless Chromium) because it runs in the same environment asupload.shand deterministically writes a path the script owns. The Chrome extension is not a drop-in fallback — it returns an inline image, not a file.This matters because the Chrome extension has a unique strength we want: it drives the user's real, authenticated session, which would let us screenshot signed-in pages without standing up local auth. Playwright (headless, no session) can't do that; today's extension can't produce a file. Neither covers "capture a signed-in page → upload" alone.
Asks (either unlocks the extension for scripted pipelines)
save_to_diskreturns an absolute path and writes to a shell-reachable location; orWith either,
capture.shcan grow an--engine chrome|playwrightswitch — Chrome chosen specifically when an authenticated session is needed, Playwright otherwise.Repro
navigateto any URL viaclaude-in-chrome.computeractionscreenshotwithsave_to_disk: true.ss_…ID, no path; no file appears on disk.Filed from an agent session that hit this while screenshotting a signed-in page for buildinternet/either#280.