{"slug": "your-agent-s-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen", "title": "Your agent's clicks stop when you minimize Remote Desktop or lock the screen", "summary": "The team behind Auten, an MCP server that gives AI agents control of a real screen, documented why GUI automation on remote Windows machines fails when an RDP window is minimized or closed: synthetic input like SendInput reports success but has no live desktop to deliver to. Their fixes are setting RemoteDesktop_SuppressWhenMinimized to 2 on the connecting machine and running tscon /dest:console on the remote host to hand the session back to the console instead of locking it, or switching to VNC, which keeps the real console alive.", "body_md": "Your agent runs fine on a Windows box you reach over Remote Desktop. You start a long task, minimize the RDP window to do something else, and come back to a run that failed halfway: clicks returned \"ok\", keystrokes went nowhere, screenshots are black or stale. Or you closed the RDP window at the end of the day and every overnight run failed at its first click.\n\nNothing is wrong with the model or your MCP server. GUI automation needs a desktop that Windows is actually drawing, and both of those actions take it away.\n\nIn all three cases synthetic input does not raise an error. `SendInput` style calls simply have no live desktop to deliver to, which is why the tool reports success while nothing moves.\n\nThis is a setting on the computer you connect **from**, not on the remote one.\n\n`regedit`, open `HKEY_CURRENT_USER\\Software\\Microsoft\\Terminal Server Client` (or the same path under `HKEY_LOCAL_MACHINE` for all users).`RemoteDesktop_SuppressWhenMinimized` with value `2`.`...\\Software\\Wow6432Node\\Microsoft\\Terminal Server Client` as well.\nOr in one line from a normal PowerShell:\n\n```\nNew-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Terminal Server Client\" `\n  -Name RemoteDesktop_SuppressWhenMinimized -PropertyType DWord -Value 2 -Force\n```\n\nReconnect, and minimizing no longer takes the remote GUI away. SmartBear notes one known side effect: it can break screen sharing in Microsoft Lync.\n\nClosing the RDP window locks the session. Instead, hand the session back to the remote computer's console. Run this **on the remote computer**, inside the RDP session, as Administrator:\n\n```\nfor /f \"skip=1 tokens=3\" %s in ('query user %USERNAME%') do %windir%\\System32\\tscon.exe %s /dest:console\n```\n\n(In a `.bat` file, double the percent signs: `%%s`.) Your RDP client closes with \"Your Remote Desktop Services session has ended\", and the desktop stays unlocked and drawn on the remote machine, so the agent keeps working.\n\nTwo things to know:\n\n`Rundll32.exe user32.dll,LockWorkStation`), never while a GUI run is still going.\nA VNC server shows the machine's real console instead of a separate virtual session. Minimizing or disconnecting a VNC client does not destroy the active desktop by default, and the same approach works on macOS (Screen Sharing is VNC) and Linux. The pywinauto remote execution guide recommends this as the simpler route. Mixing RDP and VNC on the same box brings the RDP problems back, so pick one.\n\n**A locked screen.** If the machine locks, from an idle timeout or a policy, the input goes to the secure logon desktop, which no ordinary process can drive. That is by design. For unattended runs, set the idle lock and sleep timeouts on that machine so they do not fire mid-run, if your security policy allows it, and run on a box nobody else can walk up to.\n\n`RemoteDesktop_SuppressWhenMinimized = 2` on your local computer.`tscon ... /dest:console`, not the X button.\nWe build Auten, an MCP server that gives Claude Code, Codex, Cursor or any MCP client hands on a real screen: your computer (Mac, Windows, Linux) and your Android phone (beta). It runs on the machine whose screen it controls, so it needs a live, unlocked desktop exactly like every other tool here. Setup is at [auten.ai/mcp](https://auten.ai/mcp?utm_source=devto&utm_medium=social).\n\nIf you run agents on remote Windows machines and hit a case these three fixes did not cover, describe it in the comments. We collect these.", "url": "https://wpnews.pro/news/your-agent-s-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen", "canonical_source": "https://dev.to/autenai/your-agents-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen-37g4", "published_at": "2026-11-03 05:50:31+00:00", "updated_at": "2026-11-03 05:52:19.042619+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "mlops"], "entities": ["Auten", "Claude Code", "Codex", "Cursor", "Microsoft", "SmartBear", "pywinauto", "Microsoft Lync"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/your-agent-s-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen", "markdown": "https://wpnews.pro/news/your-agent-s-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen.md", "text": "https://wpnews.pro/news/your-agent-s-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen.txt", "jsonld": "https://wpnews.pro/news/your-agent-s-clicks-stop-when-you-minimize-remote-desktop-or-lock-the-screen.jsonld"}}