Skip to content

fix(desktop): attach the key-down screen frame to every voice turn - #12579

Merged
kodjima33 merged 1 commit into
mainfrom
kodjima33/voice-screen-every-turn
Sep 2, 2026
Merged

kodjima33 merged 1 commit into
mainfrom
kodjima33/voice-screen-every-turn

Conversation

@kodjima33

@kodjima33 kodjima33 commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The voice model only saw the screen when it chose to call the screenshot tool. On Beta 0.12.256/257 it skipped that call on ~1 turn in 6 (stale in-session image, fresh barge-in session, short ambiguous audio routed to think_deeper) and answered a current-screen question ("what's the answer to this riddle?", "5+2?") from an earlier turn.

  • The PTT-down frame is now sent as in-turn realtimeInput.video on every Gemini turn (attachTurnScreenFrameIfNeeded, called when the frame finishes encoding and on every beginLiveInputTurn, once per evidence per physical session so barge-in replacements get it too).
  • Session: buffered frames are tagged with their turn and flushed at activityStart only for the matching turn; frames that miss their window are dropped at commit, never carried into the next turn.
  • think_deeper falls back to the OCR text of the same PTT-down frame when no screen observation was accepted this turn.
  • Voice instruction: the per-turn image IS the current screen; earlier images are stale; screenshot is for a fresh re-look only. Tool description updated in the manifest and regenerated.

Restores the turn-start frame delivery from 1d46c82 (vendz, Jun 17) that was dropped in the #9597 refactor.

Verification

Local omi-doors bundle built from this patch (2026-09-01 22:20). Nik exercised the real path: Notes with 5+5/5+2, and the doors page. 8 PTT turns, every one shows ptt_screen_evidence stage=turn_frame_attached followed by screen frame sent in-turn (~263 KB); answers followed the current screen, including the changed note. Regression tests added: RealtimeHubSessionInputLifecycleTests (frame flushed at activityStart; frame from a finished turn dropped), HubSystemInstructionTests (instruction + tool description), ScreenContextTelemetryTests (snapshot visibleText).

Invariants: INV-VOICE-1, INV-AGENT-1, INV-AGENT-2, INV-AGENT-3, INV-CHAT-1.
Failure-Class: none

Review in cubic

The voice model only saw the screen when it chose to call the screenshot tool, and on
Beta 0.12.256/257 it skipped that call (stale in-session image, fresh barge-in session,
short ambiguous audio routed to think_deeper) and answered a current-screen question from
an earlier turn. The PTT-down frame is now sent as in-turn video on every Gemini turn,
buffered frames are tagged with their turn and dropped when they miss it, think_deeper
falls back to the same frame's OCR text, and the instruction says the per-turn image is
the current screen and earlier images are stale.

Failure-Class: none
@kodjima33
kodjima33 merged commit 8f87ff9 into main Sep 2, 2026
@kodjima33
kodjima33 deleted the kodjima33/voice-screen-every-turn branch September 2, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant