Skip to content

feat(desktop): hang up GPT-Live after idle timeout - #111102

Open
1MORLAP wants to merge 1 commit into
NousResearch:mainfrom
1MORLAP:feat/gpt-live-idle-hangup
Open

1MORLAP wants to merge 1 commit into
NousResearch:mainfrom
1MORLAP:feat/gpt-live-idle-hangup

Conversation

@1MORLAP

@1MORLAP 1MORLAP commented Sep 14, 2026

Copy link
Copy Markdown

Summary

  • Desktop GPT-Live had no inactivity hangup, so a forgotten live call keeps billing OpenAI at $0.05/min until stop/quit/disconnect.
  • Default 300s of silence (voice.gpt_live.idle_hangup_seconds; 0 disables). Settings → Voice row included.
  • Timer pauses while a Hermes delegation is in flight (KeyArgo on Desktop GPT-Live: default idle hangup so forgotten sessions stop billing #111075): long jobs must not look like silence.
  • Chat session and in-flight work are not cancelled; only the WebRTC live session closes.

Closes #111075

Test plan

  • scripts/run_tests.sh tests/tui_gateway/test_voice_live_delegation.py (8 passed, including idle parse/default/zero)
  • apps/desktop vitest src/lib/voice-live-idle.test.ts (policy: deadline, 0=off, pause on delegation)
  • Settings → Voice shows GPT-Live Idle Hangup; set 10, start GPT-Live, stay quiet → hangup notice; set 0 → no hangup
  • Ask a long Hermes job, stay quiet during it → must not hang up until the turn finishes plus idle

Does not overlap #79574 / #76889 (chained mic only).

Forgotten full-duplex sessions keep billing OpenAI at $0.05/min.
Default 5 quiet minutes (voice.gpt_live.idle_hangup_seconds, 0 disables).
The timer pauses while a Hermes delegation is in flight so a long job
cannot look like silence.

Closes NousResearch#111075
@alt-glitch alt-glitch added type/feature New feature or request P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) tool/tts Text-to-speech and transcription area/usage-cost Token accounting, usage reporting, billing, cost tracking area/config Config system, migrations, profiles labels Sep 14, 2026
@kvnloo

kvnloo commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Comment assumes head cc1a414db19de1afa65f09b428f70b59caf1e014; void if moved.

KEEP — Desktop GPT-Live idle hangup (cost safety)

  • Default voice.gpt_live.idle_hangup_seconds: 300 (0 disables), Settings → Voice row, and hangup that closes only the WebRTC live session (chat + in-flight Hermes work stay) is the right product safety net for forgotten GPT-Live billing ($0.05/min idle counts).
  • Pausing the deadline while a Hermes delegation is in flight matches the KeyArgo scope note on Desktop GPT-Live: default idle hangup so forgotten sessions stop billing #111075 — silence during a long turn must not look like walk-away idle.
  • Prefer this as the idle-lifecycle native GPT-Live vehicle; peer complementary fix is feat(voice): add Codex subscription billing to native GPT-Live #108940 (Codex subscription auth on the same live surface) — neither replaces the other (shared files, different axes).

CHECK

One-click close / ordering

Landing-evidence

  • When merged, please reply with the merge commit SHA on main (not “completed”).

@kvnloo

kvnloo commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Comment assumes head cc1a414db19de1afa65f09b428f70b59caf1e014; void if moved.

KEEP — Desktop GPT-Live idle hangup (cost safety)

  • Default voice.gpt_live.idle_hangup_seconds: 300 (0 disables), Settings → Voice row, and hangup that closes only the WebRTC live session (chat + in-flight Hermes work stay) is the right product safety net for forgotten GPT-Live billing ($0.05/min idle counts).
  • Pausing the deadline while a Hermes delegation is in flight matches the KeyArgo scope note on Desktop GPT-Live: default idle hangup so forgotten sessions stop billing #111075 — silence during a long turn must not look like walk-away idle.
  • Prefer this as the idle-lifecycle native GPT-Live vehicle; peer complementary fix is feat(voice): add Codex subscription billing to native GPT-Live #108940 (Codex subscription auth on the same live surface) — neither replaces the other (shared files, different axes).

CHECK

One-click close / ordering

Landing-evidence

  • When merged, please reply with the merge commit SHA on main (not “completed”).

@Finn763

Finn763 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Design deltas from #111611 (I'm closing that PR as a duplicate of this one — same voice.gpt_live.idle_hangup_seconds, same 300 s default, same Settings row).

Two things in mine that might be worth taking if they aren't already here:

1. Injectable clock (testability). The watchdog takes its time source as an option instead of calling Date.now() directly:

new VoiceLiveSession(handlers, { idleHangupSeconds, now })   // now: () => number, default Date.now

so the idle deadline is asserted with a fake clock in unit tests (threshold-1 does not fire / threshold fires, 0 never fires over a simulated hour, a config of 45 is honoured) rather than with real timers.

2. Per-turn activity, not just audio. Idle is reset by every one of: vendor transcript deltas (either speaker), session.started, session.delegation.created, loud frames in the existing armSpeakingProbe, every outbound event (commentary/thinking/instructions/mute) — plus a public noteActivity() the composer hook calls on each 200 ms reply tick while a Hermes turn is in flight. That last one is the difference between "the model is thinking and the user is silent" counting as idle or as busy; without it a long tool-running turn can be hung up mid-work.

3. Poll tick vs re-armed timeout. The deadline is polled on a 1 s interval armed at construction (cleared in finish()), so the injected clock stays the only time source and a mic-permission prompt left open still hits the deadline. Teardown sends exactly {type:'session.close'} and reports onClosed('idle_timeout'), so billing stops at the close event rather than at the vendor's echo (which is why a manual stop still reports close_requested).

Not a claim that mine is better overall — take whatever is useful, ignore the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles area/usage-cost Token accounting, usage reporting, billing, cost tracking comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists tool/tts Text-to-speech and transcription type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop GPT-Live: default idle hangup so forgotten sessions stop billing

4 participants