Skip to content

MCP listSources misses windows, and never says why #1140

Closed

Description

@EtienneLescot

Found during the v2.1.0 release-candidate QA (Windows 11, CI build of release/v2.1.0 @ 9c55596).

What happened

The stdio MCP listSources returned the windows ["Claude", "Claude", "OpenScreen"], while the HUD's source selector listed 5 windows at about the same time, and a Microsoft Edge window and the Settings app ("Paramètres", a UWP window) were open. startRecording {window: "Paramètres"} then failed with No window title contains "Paramètres".

What the investigation found

  • The HUD's selector, openscreen sources and the MCP all go through the same get-sources IPC handler, which returns desktopCapturer.getSources unfiltered. Only the options differ: the HUD asks for 320×180 thumbnails and window icons, the CLI for 32×18 and no icons.
  • Those options do not change the list. Measured on this machine with Edge, Settings, Parsec and the NVIDIA overlay open: all four option sets (and a 0×0 thumbnail) return the same 5 windows, Settings included.
  • The installed CI build's openscreen sources --json and a running stdio MCP listSources both list Edge and "Paramètres" today.
  • In the failing call, Parsec and the NVIDIA GeForce Overlay were missing too, although they are always open, and a second "Claude" window was present. So the call saw a desktop on which every app but Claude and OpenScreen was not showing. That fits a computer-use session that hides the apps it has not been granted, but this was not reproduced.
  • Chromium does not list windows that are minimized or hidden, in the HUD or anywhere else. So nothing in OpenScreen dropped those windows. The real gap is that listSources and startRecording never say so. An agent that gets "No window title contains" for a window it can see in the taskbar has nothing to go on.

Fix

  • listSources says that minimized and hidden windows are not listed.
  • The startRecording/openscreen record --window miss says the window may be minimized or hidden, and to restore it.
  • The window/display pick moves to a pure function with unit tests.

Activity

  1. EtienneLescot commented on Oct 12, 2026

    @EtienneLescot
    CollaboratorAuthor

    The macOS pass on the same candidate (build run 38252812147, macOS 26.5 arm64, PR #1131) saw the same kind of gap, in both directions:

    • Pass 1, with OPENSCREEN_MAC_SOURCE_PICKER=legacy: the HUD's Windows tab listed 1 window (QuickTime), listSources listed 2 (OpenScreen, mini-boutique-demo.mp4), and the visible Claude desktop window was in neither.
    • Pass 2: listSources listed 3 windows where the HUD listed 5.

    Same conclusion on macOS: there is no second enumeration to align. CliSourcesRunner (MCP listSources, openscreen sources), CliRecordRunner.pickSource (startRecording), the HUD's SourceSelector and RecStage all call the one get-sources handler in electron/ipc/handlers.ts, and the CLI/MCP process registers it through the same registerIpcHandlers (registerAppHandlersForCli in electron/cli/cliMain.ts). OpenScreen applies no filter of its own.

    On macOS the filtering is Chromium's ThumbnailCapturerMac (Electron 41.2.1 = Chromium 146.0.7680.188, chrome/browser/media/webrtc/thumbnail_capturer_mac.mm), identical for every caller:

    • SCShareableContent getShareableContentExcludingDesktopWindows:true onScreenWindowsOnly:true: minimized windows, windows on another Space and windows behind a full-screen window are not listed;
    • windowLayer == 0 only: the HUD and the source selector (alwaysOnTop, floating level) are never listed, nor menus and the Dock;
    • width and height at least 40 points;
    • an untitled window is dropped when its app has more than one window, unless it is full screen.

    So the macOS differences are snapshots of different desktops, not different filters: OpenScreen in pass 1 is the editor window, which listSources can see from the openscreen mcp process but the HUD never can, because the HUD and the editor are never open together; and a Claude window on another Space, or in full screen while the HUD was up, is in neither list. For the fix here, the macOS wording worth adding to the listSources / miss message: windows on another Space or behind a full-screen app are not listed either, not only minimized ones.

  2. added
    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.
    status: pending releaseMerged change is waiting for a packaged desktop release.
    on Oct 13, 2026
  3. added this to the Next Release milestone on Oct 13, 2026
  4. github-actions commented on Oct 13, 2026

    @github-actions
    Contributor

    Fixed by #1150 and merged into main.

    This change is assigned to the Next Release release milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked as status: pending release until a packaged release containing it is published.

  5. EtienneLescot commented on Oct 15, 2026

    @EtienneLescot
    CollaboratorAuthor

    Moved into v2.1.0 as part of the pre-release cut.

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

    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions