watch.py wipes a pre-existing source file when it lives inside --out-dir (breaks the documented local-file re-run flow)

Author: LukeiniCreated Jul 17, 2026Updated Sep 21, 2026

Summary

When the video source passed to watch.py is a local file that lives inside the directory given as --out-dir, the run wipes the pre-existing files there during startup and then fails with File not found - the source is destroyed before the local-file path is ever read.

This collides with the re-run flow SKILL.md itself recommends ("For a URL, point the second run at the downloaded local file in the work dir so it doesn't re-download"): if the user also keeps the same --out-dir - the natural way to keep a video's artifacts together - the second run deletes the exact file it was pointed at.

Repro (Windows 11, Python 3.13, skill v0.2.0)

  1. First run - captionless video, no Whisper key, so the video gets downloaded but no transcript is produced:
bash
python watch.py "https://www.youtube.com/watch?v=<id>" --detail transcript --out-dir C:\work\watchdir

watchdir afterwards contains video.webm (43 MB), video.info.json, and the run log. Report ends normally with "Transcript: none available".

  1. Second run, pointed at the downloaded file, same out-dir:
bash
python watch.py "C:\work\watchdir\video.webm" --detail efficient --max-frames 12 --no-whisper --out-dir C:\work\watchdir
  1. Output:
[watch] working dir: C:\work\watchdir
[watch] using local file…
File not found: C:\work\watchdir\video.webm
  1. After the failed run the directory contains only the log files - video.webm and video.info.json are gone. The file demonstrably existed between the runs (listed, 43,363 KB), so it was removed by the second run's startup rather than never having been there.

Expected

Either:

  • (a) working-dir preparation must not delete pre-existing files when the resolved source path is inside --out-dir (skip the cleanup, or move/link the source aside first), or
  • (b) fail fast with a clear message ("source file is inside --out-dir; pick a different out-dir") before any deletion happens.

Silent data loss is the worst of the three outcomes - with a local recording that has no upstream URL, the source can be unrecoverable.

Workaround

Use a fresh --out-dir for the second run, or keep the source file outside the out-dir.


Otherwise a genuinely useful skill - on a 55-minute static-slide webinar the dedup pass collapsed 550 keyframe candidates to 12 distinct slides, exactly as documented.

Source: bradautomates/claude-video