Bug
Slide extraction fails under the daemon with:
Slides stream failed: yt-dlp exited with code 1:
ERROR: [youtube] ...: Requested format is not available
The same summarize --slides command works perfectly from the CLI.
Root cause
When the daemon runs under launchd, process.env.PATH is minimal (/usr/bin:/bin:/usr/sbin:/sbin). The daemon builds a merged env from the daemon.json snapshot and threads it through internal code — resolveExecutableInPath() correctly finds yt-dlp using the merged PATH. But spawnTracked() (packages/core/src/processes.ts:146) spawns child processes without passing env in the spawn options, so they inherit process.env (the minimal one).
This means yt-dlp can't find deno on PATH. Since yt-dlp 2025.11.12 (yt-dlp/yt-dlp#15012), deno is required for YouTube JS challenge solving. When cookies are enabled (--cookies-from-browser), yt-dlp uses authenticated YouTube APIs that require JS challenges — without deno, format resolution fails silently.
Reproduction
# Simulates the daemon's launchd environment:
env -i PATH="/usr/bin:/bin:/usr/sbin:/sbin" HOME=$HOME \
/opt/homebrew/bin/yt-dlp --cookies-from-browser chrome \
-f "bestvideo[height<=720][vcodec^=avc1][ext=mp4]/best[height<=720][vcodec^=avc1][ext=mp4]/bestvideo[height<=720][ext=mp4]/best[height<=720]" \
"https://www.youtube.com/watch?v=ZNL5wwflU-E" --no-download
# → ERROR: Requested format is not available
# Same command with full PATH (includes /opt/homebrew/bin where deno lives):
yt-dlp --cookies-from-browser chrome \
-f "bestvideo[height<=720][vcodec^=avc1][ext=mp4]/best[height<=720][vcodec^=avc1][ext=mp4]/bestvideo[height<=720][ext=mp4]/best[height<=720]" \
"https://www.youtube.com/watch?v=ZNL5wwflU-E" --no-download
# → works fine
Environment
- macOS 15 (Tahoe), arm64
- summarize 0.11.1 (Homebrew)
- yt-dlp 2026.2.4
- deno 2.6.9 (at
/opt/homebrew/bin/deno)
SUMMARIZE_YT_DLP_COOKIES_FROM_BROWSER=chrome set in daemon.json
Timeline
This is a latent issue that became visible through a combination of factors:
- The daemon was designed to build a merged env for internal use, but never applied it to
process.env — this was fine initially since the daemon wasn't spawning external tools.
- Slides (
d9ed602) introduced child process spawning (yt-dlp, ffmpeg). At that time yt-dlp didn't need deno, so the minimal PATH worked.
- Cookie support for slides (
3011970) made yt-dlp use authenticated YouTube APIs.
- yt-dlp 2025.11.12 made deno required for JS challenges on authenticated APIs.
- The combination of cookies + deno requirement + minimal launchd PATH triggers the failure.
Fix
PR incoming — applies the snapshot env keys to process.env in src/daemon/cli.ts before starting the server, so child processes inherit the correct PATH.
Bug
Slide extraction fails under the daemon with:
The same
summarize --slidescommand works perfectly from the CLI.Root cause
When the daemon runs under launchd,
process.env.PATHis minimal (/usr/bin:/bin:/usr/sbin:/sbin). The daemon builds a merged env from thedaemon.jsonsnapshot and threads it through internal code —resolveExecutableInPath()correctly finds yt-dlp using the merged PATH. ButspawnTracked()(packages/core/src/processes.ts:146) spawns child processes without passingenvin the spawn options, so they inheritprocess.env(the minimal one).This means yt-dlp can't find
denoon PATH. Since yt-dlp 2025.11.12 (yt-dlp/yt-dlp#15012), deno is required for YouTube JS challenge solving. When cookies are enabled (--cookies-from-browser), yt-dlp uses authenticated YouTube APIs that require JS challenges — without deno, format resolution fails silently.Reproduction
Environment
/opt/homebrew/bin/deno)SUMMARIZE_YT_DLP_COOKIES_FROM_BROWSER=chromeset in daemon.jsonTimeline
This is a latent issue that became visible through a combination of factors:
process.env— this was fine initially since the daemon wasn't spawning external tools.d9ed602) introduced child process spawning (yt-dlp, ffmpeg). At that time yt-dlp didn't need deno, so the minimal PATH worked.3011970) made yt-dlp use authenticated YouTube APIs.Fix
PR incoming — applies the snapshot env keys to
process.envinsrc/daemon/cli.tsbefore starting the server, so child processes inherit the correct PATH.