Skip to content

Feature Request: Isolated Windows GUI testing using RDP Child Sessions #51134

Open

Description

@proof1985

What variant of Codex are you using?

App

What feature would you like to see?

Summary

Please consider adding an isolated/background GUI testing mode on Windows using Windows RDP Child Sessions.

Computer Use is extremely useful for developing desktop applications, but having an AI coding agent interact with the user's actual desktop is disruptive: mouse/keyboard interaction, focus changes, window management, screenshots, overlays, and application launches interfere with the developer who is using the same machine.

Windows already provides an OS-level mechanism that appears particularly well suited for this use case: RDP Child Sessions.

This would allow the coding agent to operate a complete interactive Windows desktop in a separate local session while the developer continues working normally in the parent session.

Current problem

A common coding-agent workflow is:

edit code
    ↓
build
    ↓
launch application
    ↓
inspect UI
    ↓
click / type / interact
    ↓
verify behavior
    ↓
modify code
    ↓
repeat

For desktop application development, this loop becomes disruptive when Computer Use operates on the developer's interactive desktop.

Ideally:

Developer session                 Agent session

IDE                               Application under test
Browser                           Screenshots / vision
Terminal                          Mouse / keyboard automation
Normal desktop usage              UI Automation
                                  GUI testing

          both running simultaneously

The developer's mouse, keyboard, foreground window and desktop should remain unaffected while the agent tests the application.

Windows already has an interesting mechanism for this

Windows supports RDP Child Sessions, introduced with Windows 8 / Windows Server 2012.

This is not conventional Remote Desktop to another machine or VM.

A Child Session is a special local loopback Remote Desktop session associated with the existing user's session.

Microsoft exposes APIs including:

  • WTSEnableChildSessions
  • WTSIsChildSessionsEnabled
  • WTSGetChildSessionId
  • Remote Desktop ActiveX Control
  • IMsRdpExtendedSettings::Property("ConnectToChildSession")

With ConnectToChildSession = TRUE, an embedded RDP client can connect to the local Child Session.

Conceptually:

Codex
        │
        ▼
Parent Windows Session
        │
        ├── Developer keeps working normally
        │
        └── RDP Child Session
                │
                ├── Application under test
                ├── screenshot / vision
                ├── mouse + keyboard interaction
                ├── UI Automation
                └── automated GUI testing

This is conceptually similar to the old Visual Studio / Windows 8 Store App Simulator, which provided a complete interactive Windows environment inside a window without requiring a full VM.

Why Child Sessions instead of only background HWND automation?

Window-scoped capture and background input are useful and should absolutely remain options.

However, they do not provide a complete isolated desktop environment.

Many applications require real desktop behavior:

  • modal dialogs
  • multiple application windows
  • popup menus
  • drag & drop
  • focus handling
  • native file dialogs
  • clipboard interaction
  • applications using custom rendering
  • GPU-rendered UI
  • applications without useful accessibility/UIA trees
  • workflows involving multiple processes

A separate Windows Child Session could support these scenarios while still leaving the developer's parent session alone.

This could therefore complement window-scoped/background automation rather than replace it.

Possible modes could be:

1. Window-scoped background automation
   → lightweight, single HWND

2. RDP Child Session
   → complete isolated interactive desktop

3. Current desktop Computer Use
   → full interaction with the user's session

Example workflow

  1. The coding agent modifies a WPF/WinForms/WinUI/MAUI/Win32 application.
  2. It builds the application.
  3. It launches the application inside its Windows Child Session.
  4. Computer Use captures the Child Session instead of the user's desktop.
  5. The agent interacts with the application.
  6. It discovers a visual or behavioral problem.
  7. It modifies the source code and rebuilds.
  8. It restarts the application inside the Child Session.
  9. It verifies the fix.

Meanwhile, the developer can continue using the parent Windows session normally.

This could enable a genuinely autonomous:

edit → build → run → inspect → interact → fix → repeat

loop without the AI agent effectively taking over the developer's computer.

Existing related requests / evidence

For Codex, this is closely related to:

openai/codex #41323
"[Windows][Computer Use] Add target-window-only capture, background input, and no-overlay mode for desktop EXE automation"

That issue addresses essentially the same developer pain point through HWND-scoped capture and background input.

RDP Child Sessions could provide an additional OS-native solution for cases where window-scoped automation is insufficient.

There are also third-party projects experimenting with Windows Child Sessions for AI/desktop automation, demonstrating that the concept is practical rather than purely theoretical.

Microsoft documentation

Microsoft still documents the Child Session APIs:

  • Child Sessions — Remote Desktop Services
  • WTSEnableChildSessions
  • WTSIsChildSessionsEnabled
  • WTSGetChildSessionId
  • IMsRdpExtendedSettings
  • ConnectToChildSession

The feature has existed since Windows 8 / Windows Server 2012.

Why I think this is particularly useful for coding agents

General-purpose Computer Use sometimes needs to control the user's actual desktop.

Coding agents are different.

During application development, the GUI being controlled is often an application created specifically by the current coding task.

There is usually no reason why that application must run on the developer's physical/interactive desktop.

Giving the agent its own interactive Windows session could make GUI development dramatically less intrusive while retaining real Windows desktop semantics.

I would love to see an officially supported "isolated GUI testing" mode based on this or a similar Windows-native mechanism.

Additional information

No response

Activity

  1. added
    enhancement
    on Oct 5, 2026
  2. added
    app
    windows-os
    on Oct 5, 2026
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

    appcomputer-useenhancementwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions