Skip to content

video-digest watch fails on a large video when OS temp is a small tmpfs, and nothing can relocate its media staging #14708

Closed

Description

@kyle-sexton

Bug: video-digest watch fails on a large video when OS temp is a small tmpfs, and nothing can relocate its media staging

Severity: medium
Suggested fix location: plugins/knowledge/skills/video-digest/extraction/watch/run-watch.js watchUrl (temp dir creation) and runWatchCli (flags); plugins/knowledge/skills/video-digest/extraction/lib/temp-session-paths.js (no patch)
Reported by: agent session (overnight digest run)
Reported at: 2026-11-09T15:03:52Z

Steps to reproduce

  1. Use a host where os.tmpdir() is a tmpfs of about 4 GB with under 2 GB free.
  2. Run the watch on any public YouTube video of about 50 minutes or more whose best 1080p video stream is near 1 GB: node extraction/run.mjs ... watch/run-watch.js "<url>".
  3. The run prints watch: acquire start.

Expected behavior

One of these: the watch completes; or it checks free space first and fails with a message naming the temp dir and the space it needs; or a flag puts the media staging on a larger disk.

Actual behavior

The run exits 1 with ERROR: Postprocessing: Conversion failed! from yt-dlp. No slice is written. While it runs, it uses shared temp space that other processes on the host may need.

What the code writes to temp, on main at b0a0df2:

  • watchUrl creates video-extraction-*, video-frames-* and video-sheets-* under os.tmpdir() (run-watch.js:275-281).
  • yt-dlp's output template and its --paths temp: are both that workDir (acquire.js:178, build-yt-dlp-args.js:166-167).
  • Full mode downloads bestvideo[height<=1080]+bestaudio (build-yt-dlp-args.js:26) and adds --remux-video mp4 (:208). The separate streams, the merged file and the remuxed mp4 all go to os.tmpdir().
  • No flag relocates any of this. run-watch.js accepts --recover, --skip-research, --target, --transcript-strategy and --max-frame-gap-sec (:4-7, :70-129). run.mjs's --work-root sets where the slice goes, not temp. The extraction code has no free-space check.
  • The only lever is the TMPDIR environment variable, which os.tmpdir() honors. It has to be set for every later run.mjs call in the session, because temp-session paths are stored relative to os.tmpdir() and resolved against it again (temp-session-paths.js:54-89).

Severity justification

Medium: the default watch path is blocked for long 1080p videos on hosts with a small tmpfs temp (common on WSL and some Linux setups). A workaround exists (set TMPDIR for the whole session), but nothing documents it and the run gives no hint of it.

Notes

  • UNVERIFIED: that the conversion failure was caused by running out of temp space. Evidence: format 299 (961 MiB) plus 251 (44 MiB) against 1.8 GB free on a 4 GB tmpfs. A second copy of about 1 GB during merge or remux would need about 2 GB. No ENOSPC was captured, because the run removed its temp dirs on exit.
  • Confirmed from the code: all media staging goes to os.tmpdir(), and no CLI flag relocates it.
  • The transcript action is not affected: it passes --skip-download (build-yt-dlp-args.js:205-206).

Activity

  1. added theissue type on Nov 9, 2026
  2. added
    needs-triage
    on Nov 9, 2026
  3. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: video-digest watch (run-watch.js), its skill docs and tests; anyone running the watch on a host with a small temp dir.
    Reversible: yes; revert the change, since no flag or stored-path format is added.
    Open questions: none

    Decision recorded. Add a free-space check to the video-digest watch and document TMPDIR, with no new flag (option A).

    Question as put to the owner (Q31): "video-digest fails on a large video when temp is a small tmpfs."

    • A (recommended): add a free-space check and document TMPDIR, no new flag.
    • B: add a staging flag.
    • C: docs only.

    Chosen: A. The owner answered the batch on 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."

    This answers refinement questions 1 and 2 (no flag). For question 3, the check follows the refinement's recommendation: estimate from the selected formats' size and warn when the size is unknown.

    [quote truncated; the full decision is at the link]

    #14708 (comment)

    This decision settles every open question from the refinement. The work is a defect in existing behavior with a clear approach, so it is triaged as a medium-priority Bug. Related issues for context are #8065, #6853 and #14617, which may touch the same files. I found no merged fix.

    Automated triage. A maintainer reviews it.

  4. removed
    needs-triage
    on Nov 9, 2026
  5. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.

  6. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: Watch gets a way to survive or clearly report a small temp dir for large downloads; which mechanism is not chosen.

    Related work

    Open questions

    1. Which fix should be built: a staging-dir flag on run-watch.js, a free-space preflight that fails naming the temp dir and bytes needed, documentation of the TMPDIR workaround, or a combination?
      RECOMMENDED: Add a free-space preflight in watchUrl that fails early naming the temp dir, estimated space needed and the TMPDIR workaround, and document TMPDIR in the video-digest docs; skip a new flag. Basis: judgment: a flag would also need to persist through temp-session-paths.js, which resolves stored paths against os.tmpdir(), so the flag is the larger change.
    2. If a flag is wanted, must it persist for later run.mjs calls in the session, given temp-session paths are stored relative to os.tmpdir() and resolved against it again?
      RECOMMENDED: No flag now; if one is added, it must store the staging root in session state so later calls resolve correctly. Basis: plugins/knowledge/skills/video-digest/extraction/lib/temp-session-paths.js:54-89
    3. How should the preflight estimate required space, and should it block or only warn when the estimate is uncertain?
      RECOMMENDED: Estimate from yt-dlp format filesize (or filesize_approx) times about 2 for merge and remux, and warn rather than block when the size is unknown. Basis: judgment: the report's own arithmetic of about 2 GB for a roughly 1 GB stream, with the ENOSPC cause still unverified.

    Sources read

    • /home/runner/work/claude-code-plugins/claude-code-plugins/refine-data/context.json: issue body cites run-watch.js:275-281, build-yt-dlp-args.js:26,166-167,205-208, acquire.js:178, temp-session-paths.js:54-89; I did not re-verify those lines.
    • plugins/knowledge/skills/video-digest/extraction/transcript/run-transcript.js:58: transcript action also creates video-extraction-* under os.tmpdir().

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  7. kyle-sexton commented on Nov 17, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. Add a free-space check to the video-digest watch and document TMPDIR, with no new flag (option A).

    Question as put to the owner (Q31): "video-digest fails on a large video when temp is a small tmpfs."

    • A (recommended): add a free-space check and document TMPDIR, no new flag.
    • B: add a staging flag.
    • C: docs only.

    Chosen: A. The owner answered the batch on 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."

    This answers refinement questions 1 and 2 (no flag). For question 3, the check follows the refinement's recommendation: estimate from the selected formats' size and warn when the size is unknown.

    Acceptance criteria

    • watchUrl in plugins/knowledge/skills/video-digest/extraction/watch/run-watch.js checks free space in the temp directory before the media download starts.
    • The estimate is the selected formats' filesize (or filesize_approx) times about 2, to cover the merge and remux copies.
    • When free space is below the estimate, the watch exits non-zero before downloading, with a message that names the temp directory, the space needed, the space free and the TMPDIR workaround (set it for every later run.mjs call in the session).
    • When no size is known, the watch prints a warning naming the temp directory and continues.
    • No new CLI flag is added to run-watch.js or run.mjs, and temp-session-paths.js is unchanged.
    • The video-digest skill docs describe the TMPDIR workaround, including that it must stay set for the whole session.
    • Tests cover the fail-early, warn-on-unknown and enough-space paths without downloading a video, and CI passes.

    Posted by an agent session.

  8. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    A listed human released the issue's Work status hold, so it goes back to intake triage.

  9. melodic-automation-lanes commented on Nov 17, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"34602f588c0d56d1b09348617b37b62ae86442ddcb358b66744541956a2f0936","body_sha256":"93e805c12b303da6b1ea0b1a5db7d7ad4e1e59a9f199672b5be2dfa43910bc59"}

  10. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor
    No description provided.
  11. melodic-automation-lanes commented on Nov 17, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped partway through this issue and needs a person.

    Reason: security

    Why, in the run's own words:

    The scan job refused the run's output, so nothing was published. The run's log names why.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44125217484

    To retry, set Work status to agent-ready again (clearing the needs-human hold).

  12. melodic-automation-lanes commented on Nov 17, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44129809367, the work-resolve-issue run that agent-ready started, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share (limits.api github-token start-gate); that run ended at 2026-11-17T17:36:26Z. work-unblock has now removed and added agent-ready back to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or the kill-switch wait.

  13. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor
    No description provided.
  14. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor
    No description provided.
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

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions