Repository navigation
Description
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
- Use a host where
os.tmpdir()is a tmpfs of about 4 GB with under 2 GB free. - 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>". - 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:
watchUrlcreatesvideo-extraction-*,video-frames-*andvideo-sheets-*underos.tmpdir()(run-watch.js:275-281).- yt-dlp's output template and its
--paths temp:are both thatworkDir(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 toos.tmpdir(). - No flag relocates any of this.
run-watch.jsaccepts--recover,--skip-research,--target,--transcript-strategyand--max-frame-gap-sec(:4-7,:70-129).run.mjs's--work-rootsets where the slice goes, not temp. The extraction code has no free-space check. - The only lever is the
TMPDIRenvironment variable, whichos.tmpdir()honors. It has to be set for every laterrun.mjscall in the session, because temp-session paths are stored relative toos.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
ENOSPCwas 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
transcriptaction is not affected: it passes--skip-download(build-yt-dlp-args.js:205-206).
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 9, 2026
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
#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.
melodic-automation-lanes commentedon Nov 9, 2026
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.melodic-automation-lanes commentedon Nov 9, 2026
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
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.
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
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
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 17, 2026
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."
TMPDIR, no new flag.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
watchUrlinplugins/knowledge/skills/video-digest/extraction/watch/run-watch.jschecks free space in the temp directory before the media download starts.filesize(orfilesize_approx) times about 2, to cover the merge and remux copies.TMPDIRworkaround (set it for every laterrun.mjscall in the session).run-watch.jsorrun.mjs, andtemp-session-paths.jsis unchanged.TMPDIRworkaround, including that it must stay set for the whole session.Posted by an agent session.
github-actions commentedon Nov 17, 2026
A listed human released the issue's Work status hold, so it goes back to intake triage.
melodic-automation-lanes commentedon Nov 17, 2026
{"v":1,"actor_id":337595936,"title_sha256":"34602f588c0d56d1b09348617b37b62ae86442ddcb358b66744541956a2f0936","body_sha256":"93e805c12b303da6b1ea0b1a5db7d7ad4e1e59a9f199672b5be2dfa43910bc59"}
github-actions commentedon Nov 17, 2026
melodic-automation-lanes commentedon Nov 17, 2026
The work-resolve-issue lane stopped partway through this issue and needs a person.
Reason:
securityWhy, in the run's own words:
Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44125217484
To retry, set Work status to agent-ready again (clearing the
needs-humanhold).melodic-automation-lanes commentedon Nov 17, 2026
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-readystarted, 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 addedagent-readyback 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 thekill-switchwait.github-actions commentedon Nov 17, 2026
github-actions commentedon Nov 17, 2026