Skip to content

claude-in-chrome capture can't hand a file to shell scripts (save_to_disk: no path, no shell-reachable file) #1

Description

@zachdunn

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)

  1. Missing-path string — possibly a temporary integration gap (path not surfaced in this harness). Could be fixed.
  2. 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)

  1. save_to_disk returns an absolute path and writes to a shell-reachable location; or
  2. 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

  1. navigate to any URL via claude-in-chrome.
  2. computer action screenshot with save_to_disk: true.
  3. 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.

Activity

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