Auto-stop recording when Zoom (or other call app) exits
Feature request
When a call ends (e.g. Zoom closes or the meeting ends), minutes should automatically stop the recording without requiring a manual minutes stop or Ctrl-C.
Current behavior
call_detection watches for active calls in configured apps and prompts to start recording. But when the call ends, the recording continues indefinitely until stopped manually.
Expected behavior
When the detected call app exits (or the call itself ends), minutes should automatically call the equivalent of minutes stop and begin processing.
Motivation
The current flow requires the user to remember to stop recording after every meeting. Auto-stop on call exit would make the workflow fully hands-off: open Zoom, get prompted to record, meeting ends, recording stops and processes automatically.
Possible approach
The same call_detection poller that watches for call start could also watch for call end. A config option like auto_stop_on_call_end = true would let users opt in.
[call_detection]
enabled = true
apps = ["zoom.us"]
auto_stop_on_call_end = true # new option
Good call on the gap. One nuance before wiring it up:
People often keep recording 30-90s past hangup to capture takeaways, next steps, or a quick voice memo. "Call app exited" isn't always "recording is done." Browser-hosted calls, flaky app restarts, and back-to-back meetings muddy the signal too.
Counter-proposal: same opt-in, but the behavior is a visible countdown prompt instead of a silent hard stop. Something like "Call ended. Stopping in 30s. [Stop now] [Keep recording]". Handles your forgot-to-stop case, doesn't surprise anyone wanting post-call notes, still hands-off if you ignore it.
Also probably worth naming the flag to match the behavior. stop_when_call_ends or similar, since "auto-stop" sets the wrong expectation for something that's really assistive.
Scope would be: fires only for sessions started via call_detection (not manual minutes record), call intent only.
Work for you?
That makes a lot of sense given the extra context!
Shipped in #131. Went with the countdown variant from the thread, not a silent hard stop.
Opt in via:
```toml [call_detection] stop_when_call_ends = true call_end_stop_countdown_secs = 30 # optional, default 30 ```
Only fires for recordings started from the call-detection banner. Manual `minutes record` sessions are never auto-stopped, so the old workflow still works if you leave the flag off.
On `main` now. Will be in the next tagged release. A follow-up will add a toggle in the desktop settings panel so you don't have to hand-edit the TOML.
Thanks for the feature request and the back-and-forth on the design.
Thanks for the thoughtful implementation — the countdown variant is much better than a silent hard stop. Just enabled stop_when_call_ends = true in my config.
My pleasure, thank you for the collaboration!
Following up — stop_when_call_ends = true is configured but the recording keeps running after Zoom exits. Dug into the logs and found what's happening.
The call_ended event fires correctly with countdown_secs: 30, but the poll loop clears the countdown state ~8 seconds later before it can complete:
15:32:15 | call_ended | {'countdown_secs': 30, 'reason': 'call app no longer detected while recording'}
15:32:23 | cleared | {'reason': 'no active call detected on current poll'}
The cleared event fires because the next poll tick sees no active Zoom process and resets state — the same condition that triggered call_ended in the first place. The countdown never reaches 30s, no prompt appears, and the recording continues.
The fix would be: once call_ended fires and the countdown starts, subsequent polls seeing no active call should stay in countdown state rather than emitting cleared. Only the timer expiring (or Zoom reappearing) should transition state.
Happy to share the full log dump if useful.
Great catch, and thank you for digging into the logs. That gap between call_ended and cleared is exactly the bug signature I needed.
Root cause: the countdown reads three atomics every poll (is_recording, started_by_call_detect, stop_when_call_ends) and treats any of them flipping false as "fall through to the clear branch." A couple of paths can flip them mid-countdown. The biggest is a rejected cmd_start_recording during an active session silently cancelling the countdown, and native call capture ending early when its ScreenCaptureKit target disappeared. Once that happened the else if wiped active_call and logged the exact cleared line you saw. The countdown thread kept ticking but could never actually fire stop.
Fixed on main in fa34551. Three changes:
- Once
countdown_active=true, the poll loop defers all state transitions to the countdown thread. No more "cleared" during a ticking countdown. - If the same call is re-detected mid-countdown (Zoom hiccup, back-to-back meetings, reconnect), the countdown cancels instead of firing in the middle of a live call.
cmd_start_recordingnow early-outs before mutating call-detect atomics, so a rejected start during an active session can't kill your countdown.
Added a regression test (active_countdown_defers_state_transitions) that covers exactly your sequence. Will ship in the next release.
If you have the full log dump handy I'd still love to see it. I want to confirm which of the three paths you hit specifically, since it tells me whether there's a 4th race I haven't seen yet.
Shipped in v0.13.3.
All install paths are live: Claude Desktop extension (.mcpb attached to the release), Homebrew (brew upgrade silverstein/tap/minutes), cargo install minutes-cli, npx minutes-mcp@latest, and the signed DMG.
When you get a chance, upgrade, keep stop_when_call_ends = true in your config, and let me know how it behaves on a real call. If the countdown still orphans, reopen this and drop in the log dump and I will track down whatever 4th race is hiding.
Thanks again for the diagnosis, that log gap was the whole thing.
Confirmed fixed in 0.13.3. Log from today's call:
10:14:28 | call_ended | countdown_secs: 30
10:14:58 | call_end_auto_stop_fired | countdown_secs: 30
10:15:02 | cleared | no active call detected
cleared now comes after the stop fires, not before. Previously it was killing the countdown within 1 second. The full 30s ran cleanly.
Regression in v0.14.0. Had a Zoom 1:1 today with stop_when_call_ends = true and had to stop manually.
Log shows the same broken pattern from before 0.13.3:
15:33:06 | call_ended | {"countdown_secs":30,"reason":"call app no longer detected while recording"}
15:33:12 | cleared | {"reason":"no active call detected on current poll"}
cleared fires 6 seconds after call_ended, killing the countdown before it can complete. The full 30s never ran. Recording continued until I stopped it manually — the capture ran to last_segment_end: 1937.0s (~32 min of real call + ~32 min of drift).
Confirmed working in 0.13.3 (log from that session had call_end_auto_stop_fired at the full 30s, cleared after). This is a clean regression between 0.13.3 and 0.14.0.
Environment: macOS, minutes 0.14.0, Zoom, call-detect banner start, call_end_stop_countdown_secs not set (using default 30).
Thanks for the concrete regression report. Reopening this since the v0.14.0 log shows the exact pre-0.13.3 failure shape again: call_ended fires, then cleared fires before the 30s timer can emit call_end_auto_stop_fired.
I checked current main and the original countdown guard from fa34551 is still present in the call-detect state machine, so this looks like a different path is dropping countdown_active or call-detect session state after the countdown is armed. The suspicious area is now the interaction between native-call recording lifecycle changes in 0.14.0 and the call-end countdown state, not the original no-call decision helper alone.
I will treat this as a 0.14.0 regression and track it from your log signature. Next fix should add a regression test for the exact sequence you posted: call_ended, repeated no-active-call polls, and no cleared until either call_end_auto_stop_fired or explicit cancellation.
Fixed on main in 40a5002.
I tightened this beyond the original fa34551 guard. The new behavior is:
- Once call_ended has fired for a call-detect-started recording, repeated no-active-call polls are not allowed to emit cleared before either the countdown fires or the user explicitly cancels.
- If countdown_active somehow drops false after call_ended, but there was no explicit cancellation, the detector re-arms the countdown instead of clearing active_call and leaving the recording running.
- The recording-session cleanup guard no longer force-clears countdown_active. The countdown thread owns active=false so the state transition is serialized through the timer/cancel path.
- I also hardened the process-list test that made the call-detect suite flaky in sandboxed runners.
Regression coverage added/updated:
- active_countdown_defers_state_transitions now covers your v0.14.0 shape: call_ended already fired, countdown_active is unexpectedly false, no cancel was observed, and the result must be re-arm rather than cleared.
- The full call-detect test slice now passes locally.
Local verification:
- cargo test -p minutes-app --no-default-features call_detect -- --test-threads=1
- cargo test -p minutes-core --no-default-features --features diarize --lib -- diarize --test-threads=1
- cargo clippy --all --no-default-features -- -D warnings
- cargo fmt --all -- --check
- git diff --check
CI is running here: https://github.com/silverstein/minutes/actions/runs/24861880198
Thank you for the exact log signature. The call_ended -> cleared-before-30s sequence is now a pinned regression case rather than tribal memory.
Follow-up from an adversarial pass before cutting a patch release: I added one more hardening commit after the first fix.
Additional change on main:
- b647c35 marks terminal countdown states explicitly. When the countdown fires, or when the recording is already stopped, the countdown now sets the cancel/terminal latch before clearing countdown_active. That closes a small race where a detector poll could theoretically see call_ended=true + countdown_active=false before observing the recording/session shutdown and re-arm the countdown.
Release-prep cleanup is also on main in 9d7cb46, and the current CI run for that head is here: https://github.com/silverstein/minutes/actions/runs/24862589710
I am treating this as a v0.14.0 regression that should go out in a patch release once this head is green.
Shipped in v0.14.1: https://github.com/silverstein/minutes/releases/tag/v0.14.1
Release verification is complete:
[email protected]and[email protected]are live on npm.- Release assets are uploaded: CLI binaries, signed/notarized macOS DMG, Windows desktop installer/portable exe,
latest.json, andminutes.mcpb. - Release workflows are green: CLI binaries, macOS, and Windows desktop.
The patch includes the call-end countdown fix plus the follow-up terminal-state hardening from the adversarial pass, so the call_ended -> premature cleared regression should no longer leave recordings running after the countdown path is armed.
v0.14.1 regression still present
Hit the same failure shape today on a second call of the day. I had to stop manually.
Environment: macOS, minutes 0.14.1, Zoom, call-detect banner start.
Log sequence:
{"extra":{"action":"reminder","app_name":"Zoom","details":{"recording_active":true,"reminder_interval_secs":20},"process_name":"zoom.us"},"file":"","level":"info","step":"call_detect","ts":"2026-04-27T17:33:43.209925-05:00"}
{"extra":{"action":"reminder","app_name":"Zoom","details":{"recording_active":true,"reminder_interval_secs":20},"process_name":"zoom.us"},"file":"","level":"info","step":"call_detect","ts":"2026-04-27T17:34:03.879409-05:00"}
{"extra":{"action":"mic_gate_inactive","app_name":null,"details":{"mic_live":false},"process_name":null},"file":"","level":"info","step":"call_detect","ts":"2026-04-27T17:34:10.733769-05:00"}
{"extra":{"action":"call_ended","app_name":"Zoom","details":{"countdown_secs":30,"reason":"call app no longer detected while recording"},"process_name":"zoom.us"},"file":"","level":"info","step":"call_detect","ts":"2026-04-27T17:34:10.783881-05:00"}
{"extra":{"action":"cleared","app_name":null,"details":{"reason":"no active call detected on current poll"},"process_name":"zoom.us"},"file":"","level":"info","step":"call_detect","ts":"2026-04-27T17:34:29.972577-05:00"}
call_ended at T+0, cleared at T+19s — countdown was 30s, no call_end_auto_stop_fired ever emitted.
Observation: This is the same exact pre-fix shape from the earlier regression report. The cleared event fires before the 30s countdown can complete, which leaves the recording running indefinitely.
Additional context: This was the second Zoom meeting of the day. The first meeting (13:00–13:54) ended cleanly — cleared fired with reason: no active call detected on current poll without a prior call_ended, which appears to be a different exit path. Only the second meeting hit this sequence.
The recording did eventually get processed correctly once I stopped it manually, so no data loss — just the manual intervention.
Fixed on main in 302ec7c.
What changed:
- Split the countdown state into two concepts instead of overloading one cancel bit for everything:
cancelnow just tells the countdown thread to exit, while an explicit terminal state records whether that exit was a real user cancel, an already-stopped recording, or an auto-stop fire. - The detector now only treats the countdown as terminal when that explicit terminal state is present. If the generic cancel/active bits get into an ambiguous mid-countdown state, it re-arms instead of logging
clearedand orphaning the recording. - Added cancellation-reason logging so future reports can distinguish user cancel vs recording teardown vs auto-stop fire much more quickly.
- Expanded the
call_detectregression coverage to pin the reopened failure shape.
Verification run locally:
cargo test -p minutes-app --no-default-features call_detect -- --test-threads=1cargo fmt --all -- --checkgit diff --checkcargo clippy --all --no-default-features -- -D warnings
I have not yet re-proved this on a real Zoom session locally, so I’m leaving the GitHub issue open until we get one more field confirmation on the next real call.
Hit this twice today on a busy meeting day. Forgot to stop after standup; recording ran ~2h beyond the meeting end (8769s WAV vs ~30 min of real content). The trailing silence triggered a separate failure in the background processing worker — see #204 — so the cost of forgetting minutes stop isn't just wasted disk, it can wedge the queue.
Audio energy in the wasted tail was a clean ~10 dB below the active portion (mean −38 dB vs −29 dB), so a simple energy-threshold trim at recording-stop time would also be a viable mitigation if call-end detection is hard to nail down for every app.
Thanks for the update — agreed, this means #129 is not closed yet. The #204 worker isolation fix should reduce the downstream damage from a long silent tail wedging desktop processing, but it does not prove the call-end countdown itself is reliable.
I am leaving this issue open. The next thing we need is either a current-build real Zoom confirmation showing call_ended -> call_end_auto_stop_fired -> cleared, or another patch if the latest build still shows call_ended -> cleared before the configured countdown. The April 29 report is enough evidence that we should not mark this addressed just because adjacent queue handling improved.
✨ Hit a related but different failure shape on minutes 0.17.3 — and the recording ran ~5 hours past real content (37 min meeting + 313 min idle silence) before I noticed and stopped manually.
What happened:
stop_when_call_ends = true is set. Zoom was running. I started the recording manually (CLI / capture source) rather than via the call-detect banner. Call-detect saw Zoom but treated it as recording_active: false for the entire session:
{"step":"call_detect","extra":{"action":"detected","app_name":"Zoom","details":{"recording_active":false,"reminder_interval_secs":20}}}
... 130 reminder events over ~48 min, all with recording_active:false ...
{"step":"call_detect","extra":{"action":"mic_gate_inactive","details":{"mic_live":false}}}
{"step":"call_detect","extra":{"action":"cleared","details":{"reason":"no active call detected on current poll"}}}
No call_ended event ever fired, no countdown ever armed, no call_end_auto_stop_fired. From the state machine's view it was correct — auto-stop is opt-in to call-detect-started recordings only, per your earlier scope decision in this thread — but from the user's view this is the worst-case version of the bug the original issue was filed against.
Two distinct things this surfaces:
-
Manual-record-during-active-call is the same hands-off failure mode the issue was opened to fix. When Zoom is detected and a recording is already active (regardless of who started it), I'd argue the recording session should attach to the call so
stop_when_call_endscovers it. The current behavior — silently letting it run forever because the user pressed record themselves while Zoom was visible — defeats the feature's purpose. -
silence_auto_stop_secsdidn't fire either. Config hassilence_auto_stop_secs = 1800(30 min). 313 min of essentially silent idle audio went past with no auto-stop. The audio energy in the tail averaged ~10 dB below the active portion, which is the same shape I reported in the April 29 follow-up. Either this knob is wired wrong, the silence threshold is hard to satisfy with realistic room noise, or the timer is gated on something else. Worth checking the test that's supposed to pin this.
Environment:
minutes 0.17.3, macOS, Apple Silicon- Recording started via
minutes record(CLI), source:capture - Zoom active throughout the real meeting
[call_detection] stop_when_call_ends = true, call_end_stop_countdown_secs = 30[recording] silence_auto_stop_secs = 1800, max_duration_secs = 28800
Thank you for the May 13 follow-up, and sorry I let this sit without a direct response. This is exactly the kind of field report that helps keep the feature honest.
I agree with both points in your report:
-
A manual recording started while an active call is detected should be able to attach to that call for
stop_when_call_ends. The original scope was narrower - only sessions started from the call-detect banner - but your example shows that scope misses the real user intent. If Zoom is visibly active,stop_when_call_ends = trueis set, and the user starts recording manually, the app should not quietly opt out of call-end protection. -
silence_auto_stop_secsnot firing after 313 minutes of mostly idle tail is its own bug. Whether that is threshold tuning, gating, or a path that never arms the timer, the current behavior is not useful enough as a safety net.
I am not going to claim the upcoming native-capture recovery patch fixes this. That patch is narrowly about stranded native-call capture artifacts and making sure usable stems get queued instead of left behind. This auto-stop/manual-attach behavior remains open and should be treated as known unresolved work until we pin it with tests and a real-call confirmation.
Next implementation shape I would expect:
- when call detection sees an active call and a recording is already active, attach that recording to the detected call if
stop_when_call_endsis enabled, even if the recording was started manually - emit an explicit log event for that attachment, so future reports can distinguish "not attached" from "attached but countdown failed"
- add a regression test for the exact
recording_active:falsereminder loop you posted - audit
silence_auto_stop_secsseparately with a long-tail fixture so it cannot silently fail as the fallback
Thanks again for the careful log slice. This stays open, and I will avoid wording the next release as if call-end auto-stop reliability is solved.