Skip to content

fix(interceptor): Capture.sh no longer passes --out to interceptor screenshot - #2106

Open
pai-scaffolde wants to merge 1 commit into
danielmiessler:mainfrom
pai-scaffolde:fix/e-capture-save-cwd
Open

fix(interceptor): Capture.sh no longer passes --out to interceptor screenshot#2106
pai-scaffolde wants to merge 1 commit into
danielmiessler:mainfrom
pai-scaffolde:fix/e-capture-save-cwd

Conversation

@pai-scaffolde

Copy link
Copy Markdown

Reproduced on a fresh LifeOS 7.40.4 install (macOS, Claude Code in the Claude desktop app, stock interceptor 0.24.13); the fix was applied to that install and Capture.sh run end to end there before filing. Fixes #2065.

Observed

$ bash skills/Interceptor/Tools/Capture.sh https://example.com
Capture.sh: FAIL — capture did not succeed after recovery.
  last error: error: unknown flag '--out' for 'screenshot' (--out belongs to 'save' and 'net';
  'screenshot --save' writes the image to disk). ...
exit 9
$ interceptor help screenshot | grep -c -- '--out'
0

Every capture — DOM path, --pixel fallback, and the recovery loop — failed the same way, so the skill's mandatory browser verification could not produce one screenshot.

Root cause

Capture.sh:189 builds SS_FLAGS=(--context "$CTX" --save --out "$OUT"). Upstream interceptor screenshot has no --out; the flag belongs to save and net. The wrapper was written against the maintainer's cherry-picked binary (SKILL.md "Pinned binary" note), which SKILL.md itself says does not describe public installs. On a stock binary --save writes into the CLI's cwd and reports the file as filePath — which resolve_saved() already lifts into $OUT for the --pixel path.

Fix

Drop --out from SS_FLAGS; run both dom_capture and pixel_capture in a subshell cd'd to $OUT's directory so --save lands there; the existing resolve_saved() moves the reported filePath onto $OUT. --full is still accepted by the CLI (it gets past flag parsing to the context lookup). SKILL.md's stock-install sentence now says this instead of "pass --out explicitly".

How tested

  • bash -n Capture.sh clean.
  • Negative control on the stock CLI (no browser needed): interceptor screenshot --context zz-bogus --save --out /tmp/x.pngerror: unknown flag '--out' for 'screenshot' (rejected before any daemon contact); ... --save --full and ... --save → reach the context lookup.
  • End to end on the live install in the pinned test profile: Capture.sh https://example.com prints the saved path and exits 0; the --save result carries filePath as resolve_saved() expects.

🤖 Generated with Claude Code

…creenshot`

The stock interceptor CLI rejects `--out` on `screenshot` ("unknown flag
'--out' for 'screenshot' (--out belongs to 'save' and 'net'; 'screenshot
--save' writes the image to disk)"), so both the DOM path and the --pixel
fallback failed and the wrapper exhausted recovery with exit 9 on every
call. The flag only ever worked against the maintainer's cherry-picked
binary (SKILL.md "Pinned binary" note).

`--save` writes into the CLI's cwd and reports the file as "filePath".
Run each capture from $OUT's directory and let the existing resolve_saved()
move the reported file onto $OUT — the reconciliation the --pixel path
already relied on. SKILL.md's stock-install sentence now says that instead
of "pass --out explicitly".

Public issue danielmiessler#2065.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant