minutes icon indicating copy to clipboard operation
minutes copied to clipboard

process_audio hangs / times out unconditionally on Windows - independent of audio duration, no error, no log trace

Open Cedric-Duchene opened this issue 4 months ago • 3 comments

Summary

On Windows, every call to the MCP tool process_audio fails with a request timeout (MCP error -32001: Request timed out), regardless of the input audio file's duration. The failure is identical whether the file is 41 minutes or 10 seconds long, which rules out a duration-based timeout. No error, job record, or diagnostic trace of any kind is produced anywhere in Minutes' own state.

Environment

OS: Windows 11 Install: Claude Desktop MCP extension (ant.dir.gh.silverstein.minutes), version 0.19.0 (confirmed via manifest.json — already the latest published version, so this is not fixed by upgrading) Whisper model: ggml-small.bin, 465MB, present at ~/.minutes/models/ and correctly sized (not truncated) ffmpeg: installed, added to PATH, confirmed working standalone (used to split/trim test clips) No config.toml exists at either ~/.config/minutes/config.toml or %APPDATA%\minutes\config.toml — so [summarization] engine = "agent" is not configured. This rules out an external LLM agent subprocess (e.g. shelling out to claude/pi/codex for summarization) as the cause.

Steps to reproduce

Call process_audio with a .mp3 file path, language: "fr". Observe the call times out after some interval with no result.

Tested with:

Original 41-minute recording A 6-minute segment (ffmpeg -f segment -segment_time 360 -c copy) A 90-second clip (ffmpeg -t 90 -c copy) A 10-second clip (ffmpeg -t 10 -c copy)

All four attempts timed out identically. Duration has no effect on the outcome.

Expected behavior

Transcription completes in a time roughly proportional to audio duration (per the project's own benchmarks), and/or a clear job record / error appears if something goes wrong.

Actual behavior

The MCP call itself returns MCP error -32001: Request timed out every time. list_processing_jobs (with include_completed: true) returns {"jobs":[]} — no job is ever recorded, before, during, or after the failed call. list_meetings returns {"meetings":[],"actions":[],"view":"dashboard"}. ~/.minutes/inbox/failed and ~/.minutes/inbox/processed are both empty. ~/.minutes/jobs contains only an archive folder and a .archive-initialized-v1 marker — no active/pending/failed job files from any of the attempts. ~/.minutes/logs/mcp-crash.log contains only server startup/lifecycle events (module-load-start, main-start, transport-created, transport-connected) — nothing at all related to process_audio invocations, successful or failed.

What's been ruled out

Audio duration — identical failure from 10s to 41min. Antivirus interference — added a Bitdefender exclusion for the Minutes folders and rebooted the machine; the exact same timeout recurred immediately afterward. Automated LLM summarization subprocess — no config.toml exists, so no external agent (claude/pi/codex/etc.) is configured to be invoked during processing. Model corruption — ggml-small.bin is present and matches the expected ~465MB size. Stale extension version — confirmed running 0.19.0, the current latest release.

Hypothesis

The failure looks consistent with a blocking/deadlock bug in a Windows-specific code path somewhere in the transcribe/diarize pipeline (or the IPC between the MCP server and the core engine), rather than anything duration- or config-related. This repository has had similar Windows-only blocking bugs before, where a primitive that behaves fine on macOS/Unix (e.g. thread join(), piped stdin) hangs forever on Windows because an expected signal (EOF, process exit, etc.) never arrives - for example:

#261/#262 — Windows-only hang on app quit caused by an unconditional JoinHandle::join() on a PTY reader thread that never sees EOF under Windows ConPTY. #288 — a fixed ~300s timeout on every summarization call, independent of transcript length, caused by an unconditionally piped stdin that was never written to or closed for agents using --file args.

The zero-trace-anywhere behavior (no job record, no log line, no error) suggests whatever is blocking sits fairly early in the pipeline, before any per-job state is persisted.

Question

Is this a known issue, or is there additional Windows-specific diagnostic logging (beyond mcp-crash.log) that could help pin down where the hang occurs?

Cedric-Duchene avatar Jul 06 '26 09:07 Cedric-Duchene

Thanks for one of the best bug reports we've gotten — the duration sweep, the ruled-out list, and the #288 / #261 / #262 pattern-match all pointed us the right way.

What we found: it's almost certainly not the ffmpeg path — that decode already uses the Windows-safe stdio pattern (null stdin, null stdout, stderr drained via .output(), no wait()-before-drain). The likely culprit is the in-process native whisper call (model load / integrated Silero VAD setup / inference) wedging on Windows, where our parent process can't kill or observe it — the same class of hang as the ones you cited.

Why 10s and 41min fail identically (the mystery you flagged): the MCP layer wraps the CLI in a fixed 300s timeout, and whisper's internal deadline (~300 + 3×durations) always exceeds it — so for every input the outer 300s clock fires first, regardless of audio length. That's exactly the "duration has no effect" you observed. And since a 10s clip should transcribe in seconds, the fact that it also hits 300s means it's genuinely wedged, not just slow.

On your diagnostics question: yes — we're adding stage breadcrumbs, a trace file written independent of process exit (process.start → decode.done → whisper.model_load.start/done → whisper.full.start/done), so we can see exactly where it wedges (model load vs VAD vs inference). That turns our current medium-confidence hypothesis into a precise answer, and points us at the right targeted fix (e.g. gating VAD on Windows, or moving whisper behind a killable worker with an honest timeout+error instead of a silent 300s death).

Would you be up for running a build with that tracing once it lands? In the meantime, two quick checks that would help narrow it immediately:

  1. Does a .wav file also hang? (It skips ffmpeg entirely — if yes, that confirms the decode path is innocent and it's downstream in whisper.)
  2. Is there anything in ~/.minutes/logs/minutes.log (distinct from mcp-crash.log)? Even a partial line tells us how far it got.

Really appreciate the depth here — it's saving us a lot of guessing.

silverstein avatar Jul 06 '26 17:07 silverstein

Update: the stage-breadcrumb tracing is merged to main (#416) and will be in the next release. It writes ~/.minutes/logs/process-audio-trace.jsonl, flushed after each stage, so the last line in that file will name exactly where it wedges on your machine (model-load vs VAD vs inference). If you're able to build from source in the meantime you can use it now; otherwise it'll come with the next published version. The two no-build checks from above (does a .wav also hang, and anything in ~/.minutes/logs/minutes.log) would still help narrow it right away. Thanks again.

silverstein avatar Jul 06 '26 17:07 silverstein

Both results are exactly what we needed, thank you:

  1. .wav also hangs → confirms the ffmpeg/decode path is innocent; the wedge is in whisper (model load / integrated VAD / inference), as suspected.
  2. No minutes.log at all → tells us the CLI's own logging initializes after the hang point, so it never gets a chance to write. That's precisely why the new breadcrumb trace uses a separate file that's flushed to disk after every stage — it captures progress even when normal logging never runs.

No problem waiting for a published release rather than building from source — the tracing will be in the next version. And given how tightly this now localizes to the whisper stage, we'll look at pairing a candidate fix (e.g. gating the integrated VAD on Windows, and/or putting whisper behind a killable worker with an honest timeout + error instead of a silent 300s death) with the diagnostic in that release, so the next version has a real shot at fixing it, not just pinpointing it. The trace will still confirm we fixed the right stage.

Appreciate the careful testing — it turned a zero-trace mystery into a well-localized bug.

silverstein avatar Jul 07 '26 01:07 silverstein