Skip to content

Implement OpenAI Realtime 60-minute session rotation on macOS #9667

Closed

Description

@Git-on-my-level

Parent issue

Implements the resolution for #9666.

Problem

When an OpenAI Realtime socket reaches its 60-minute provider limit, macOS Desktop currently treats the close as an unclassified error. The retired socket can then be reused by a later voice interaction, producing a disconnected-socket failure.

Resolution

  • Classify OpenAI's known maximum-session-duration close at the RealtimeHubCloseClassifier boundary as a typed provider session-rotation condition.
  • Quietly retire and re-warm/reconnect an expired warm transport when no logical voice turn is active.
  • When expiry happens during an active voice turn, terminate it exactly once through VoiceTurnCoordinator and return the floating-bar/UI projection to a defined recoverable state.
  • Ensure the next PTT turn obtains a healthy transport and never writes to the retired socket.
  • Record expected rotation using safe structured, non-error diagnostics; retain error-level reporting for unexpected provider, authentication/quota, and reconnect failures.

Acceptance criteria

  • A focused classifier test recognizes the OpenAI maximum-duration close without allowing raw provider text outside the classifier boundary.
  • A lifecycle test covers warm-session expiry followed by a PTT turn and proves the next turn uses a healthy transport.
  • A lifecycle test covers expiry during an active turn, produces exactly one terminal outcome, and leaves the UI actionable.
  • Expected rotation is observable without user data or raw provider payloads and does not emit an error-level Sentry event.
  • Unexpected closes and reconnect failures remain observable at error level.
  • Relevant focused Swift tests and the applicable Desktop voice/realtime harness or gauntlet pass.

Scope

Keep VoiceTurnCoordinator as the logical voice-turn owner and RealtimeHubController as the socket/audio transport driver. Do not change provider selection, authentication policy, Gemini token minting, or unrelated PTT capture behavior.

Activity

  1. added
    bug
    p2
    on Jul 14, 2026
  2. added a commit that references this issue on Jul 14, 2026
    c66dcc2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdesktopmacOSp2reliability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions