Skip to content

fix(desktop): queue GPT-Live delegations without truncation - #110450

Open
jbric16 wants to merge 1 commit into
NousResearch:mainfrom
jbric16:fix/gpt-live-queued-delegations
Open

fix(desktop): queue GPT-Live delegations without truncation#110450
jbric16 wants to merge 1 commit into
NousResearch:mainfrom
jbric16:fix/gpt-live-queued-delegations

Conversation

@jbric16

@jbric16 jbric16 commented Sep 14, 2026

Copy link
Copy Markdown

What does this PR do?

GPT-Live currently submits new delegations while Hermes is still working. Depending on timing, that can redirect the active turn, paint a request as already sent, or lose part of a long spoken request.

This change gives GPT-Live its own profile setting for concurrent requests:

  • interrupt: preserve the existing Hermes behavior. This is the default.
  • queue: put the request in the visible Desktop composer queue and run it after the active turn.

steer is not offered. A steered message does not produce a separate Hermes turn that GPT-Live can reliably match to its delegation.

The latest spoken request is now accumulated separately from the bounded conversation window. Hermes receives the complete request as the submitted prompt. Only the earlier spoken context is capped, and that context stays in memory instead of being written to localStorage.

The gateway also applies the profile's GPT-Live policy when Desktop has stale busy state. This prevents a late renderer update from changing queue or interrupt behavior.

Related Issue

No linked issue.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added voice.gpt_live.busy_delegation_mode with interrupt as the default and queue as the opt-in value.
  • Added the profile-scoped "Concurrent Voice Requests" select to Desktop Voice settings.
  • Routed busy GPT-Live requests through the visible composer queue when queue mode is selected.
  • Kept queued voice requests FIFO ordered, editable, removable, and non-steerable.
  • Made the gateway read the policy from the session's profile and enforce it when client busy state is stale.
  • Preserved the full latest user utterance without applying the supplemental context cap to it.
  • Kept only the newest 6,000 characters of supplemental spoken context.
  • Kept voiceContext and the live-session source out of persisted composer queue snapshots.
  • Preserved the surface and spoken context on each gateway queue entry.
  • Added tests for long utterances, repeated requests, queue draining, privacy, profile-scoped config, stale busy state, and interrupt compatibility.

How to Test

  1. Set Voice Chat Mode to gpt-live in Desktop settings.
  2. Set Concurrent Voice Requests to Interrupt current turn. Start a Hermes turn, then make another GPT-Live request. Confirm the active turn follows the existing interrupt or redirect behavior.
  3. Set Concurrent Voice Requests to Queue for next turn. Start a Hermes turn, then make another GPT-Live request. Confirm it appears in the composer queue and runs after the active turn.
  4. Make a long spoken request with distinct details near the beginning, middle, and end. Confirm all details reach Hermes.
  5. Restart Desktop with a queued voice request and confirm supplemental spoken context is not restored from local storage.

Commands run:

uv run --extra dev pytest tests/tui_gateway/test_voice_live_delegation.py tests/tui_gateway/test_config_set_voice_chat_mode.py -q
16 passed

npm test -- --run src/app/chat/composer/hooks/use-voice-live-conversation.test.ts src/app/chat/composer/hooks/use-composer-queue.test.tsx src/app/settings/voice-provider-fields.test.ts
36 passed

npm run typecheck
npx eslint <changed Desktop files>
python3 -m py_compile <changed Python files>
git diff --check
npm run pack

The macOS ARM package built and signed successfully. Notarization was skipped because notarization credentials were not configured.

I also ran the repository's full scripts/run_tests.sh -q command from a clean worktree with the same extras as CI. The macOS run was not green. The failures were in unrelated updater, WSL, PulseAudio, command-line, file, and search tests. Representative failures in test_update_autostash.py, test_voice_mode.py, and test_execution_flag_detection.py reproduce on the upstream base commit, so the full-suite checkbox remains open.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS ARM64

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings), or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys, or N/A. The Desktop schema comes from hermes_cli/config_defaults.py.
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows, or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide
  • I've updated tool descriptions/schemas if I changed tool behavior, or N/A

Screenshots / Logs

No screenshot included. The setting uses the existing enum field component in Voice settings.

Route busy GPT-Live requests through the visible composer queue instead of interrupting the active Hermes turn. Preserve the complete latest spoken utterance as the prompt while bounding only supplemental voice context, and keep server-side queue envelopes surface-aware.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Sep 14, 2026
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 comp/cli CLI entry point, hermes_cli/, setup wizard comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants