Repository navigation
Description
Summary
On Windows, the bundled Computer Use native helper appears able to perform a UI Automation cache read against the current foreground window even when that application is unrelated to the requested target application.
In the observed case, the Codex task was working with Chrome, but the Computer Use helper's background accessibility monitor obtained the HWND of an already-running Everything window and called ElementFromHandleBuildCache against it.
Everything then became effectively hung/busy.
The user never requested Codex to inspect, search, activate, or control Everything.
Offline analysis of a captured process dump indicates that this was not caused by Codex launching Everything. Instead, codex-computer-use.exe followed an internal monitor path that obtains the current foreground window without carrying a specific target HWND.
This looks like a target/application-boundary problem in the Windows Computer Use accessibility monitor.
Environment
- Codex Desktop on Windows
- Bundled Computer Use /
@oai/sky - Native helper:
codex-computer-use.exe - Target application requested by the task: Chrome
- Unrelated affected application: Everything
- Everything was already running before the Computer Use helper started
Exact Codex/Computer Use build numbers were not captured in this diagnostic pass.
Observed timeline
Relevant timestamps from the captured run:
- Everything had already been running since approximately 08:52.
- 10:15:22.373 — the Chrome-related task called
sky.list_apps(). - 10:15:23.291 —
sky.list_apps()returned. - Startup of
codex-computer-use.execorresponds to this stage. - 10:15:34.672 — the task later called Chrome
get_window_state(..., include_text: true).
The important point is that the task was targeting Chrome. There was no explicit Everything operation.
Native dump evidence
Offline WinDbg/disassembly analysis of the saved codex-computer-use.exe dump found an accessibility-monitor path with approximately the following behavior:
monitor queue / message processing
↓
no concrete target window / state == -1
↓
internal branch
↓
GetForegroundWindow()
↓
Everything HWND
↓
ElementFromHandleBuildCache(...)
↓
UIA cache/tree read against Everything
In the captured monitor thread:
- the native frame still contained the Everything HWND (
0x5516AA); - relevant frame state values were
0xffffffffffffffff, consistent with the branch that does not carry a concrete target-window payload; - an additional state value was
3, but its enum/type symbols are unavailable, so I am not claiming that3means focus-change, timer refresh, startup refresh, etc.; - disassembly confirmed an internal path that reaches
GetForegroundWindow(); - the resulting foreground HWND was Everything;
- the helper subsequently entered
ElementFromHandleBuildCache.
The dump therefore provides evidence that the helper actually performed a UIA cache read against Everything.
What is proven vs. not yet proven
Supported by the captured dump
codex-computer-use.exehad an active background accessibility-monitor path.- That path can obtain the current foreground HWND without using a specific requested target HWND.
- In this run, the HWND obtained by that path was the Everything window.
- The helper performed
ElementFromHandleBuildCache/ UIA cache construction against that Everything HWND. - The user task itself was targeting Chrome, not Everything.
- Everything was not launched by this task; it had been running substantially earlier.
Not yet determined
The dump does not contain enough historical event tracing to determine exactly what woke the monitor for the first read.
Possible sources still include:
- helper/startup initialization;
- an accessibility or foreground-window event;
- a periodic/timed monitor refresh;
- an internal queue message;
- another Computer Use initialization request.
I therefore do not want to claim which of those mechanisms triggered the first read without additional tracing.
Why this seems problematic
Application discovery and target control appear to be crossing two different scopes.
A task may explicitly target Chrome, but the helper's background accessibility monitor can independently do:
GetForegroundWindow()
→ build UIA cache for whichever application happens to be foreground
That means an unrelated desktop application can receive a potentially expensive accessibility-tree traversal merely because it was foreground at the wrong moment.
For applications with large, unusual, or slow UIA providers, this may cause significant latency or hangs.
It also appears inconsistent with the expectation that Computer Use inspection should remain scoped to the application/window selected for the task.
Expected behavior
Computer Use should not build a full UIA cache for an unrelated foreground application unless that application is explicitly part of the current Computer Use target/allowed scope.
For example:
target HWND/app = Chrome
monitor event
↓
GetForegroundWindow()
↓
if HWND/process is outside current authorized target set:
do not perform ElementFromHandleBuildCache
Alternatively, monitor initialization/discovery should use lightweight HWND/process metadata and defer UIA tree/cache construction until a specific target application has been selected.
Actual behavior
A Chrome-related Computer Use task started the Windows helper.
The helper's background accessibility monitor independently obtained the current foreground window.
That window happened to be Everything.
The helper then performed a UIA ElementFromHandleBuildCache operation against Everything even though Everything was unrelated to the task.
Everything subsequently became unresponsive/busy.
Possible reproduction
A minimal reproduction to validate the suspected lifecycle would be:
- Start Everything and leave its window in the foreground.
- Start a fresh Codex Computer Use runtime.
- Target Chrome or another unrelated application.
- Execute only a low-risk discovery operation such as
sky.list_apps(). - Trace:
- helper process creation;
- monitor queue events;
GetForegroundWindow;- returned HWND;
ElementFromHandleBuildCache.
- Check whether the foreground Everything HWND receives a UIA cache read before any explicit request to inspect Everything.
A useful timestamp sequence would be:
T0 helper process created
T1 list_apps request received
T2 monitor request/event queued
T3 GetForegroundWindow()
T4 unrelated HWND returned
T5 ElementFromHandleBuildCache(unrelated HWND)
If this happens during startup/discovery before a target-window inspection request, that would make the scope leak especially clear.
Suggested fix / invariant
The Windows accessibility monitor should maintain an explicit target/authorized HWND or process set.
A full UIA cache/tree read should only occur when the HWND belongs to that set.
If the monitor needs to observe foreground changes globally, it should first perform only lightweight HWND/PID checks and avoid constructing an accessibility cache for out-of-scope processes.
Related issue
- Windows Computer Use rejects Chrome modal dialog HWND and can capture Codex instead #36603 — Windows Computer Use can capture Codex instead of the selected Chrome target / transient dialog. This appears related at the target-boundary level, but the present report is specifically about a background accessibility monitor performing a heavy UIA read against an unrelated foreground application.
Additional note
No application code was modified during this investigation. The conclusions above come from saved dump/binary analysis rather than modifying Everything or forcing additional searches after the incident.
Activity
dmitrijneumytov-crypto commentedon Oct 29, 2026
Windows Computer Use: sustained Word CPU after a completed turn with a Word deny rule
The existing report concerns another application and does not establish the mechanism in this Word and Excel case. The following measurements may help investigate it.
User observations on the main computer
codex-computer-use.exehelper was stopped.codex-computer-use-swift.exeprocess was left running.Isolated guest environment
26.1023.6123.0;@oai/skyversion0.7.13.11.0.8411, with the Office compatibility pack installed. A generated 44-page synthetic DOCX was open; no user document was used or saved.26.1023.6621.0on Windows 11 build 26300. This differs from the guest package, so the guest result is not a version-identical host reproduction.Guest reproduction and comparison
The same guest Word process and synthetic document were kept in the foreground. A separate monitor sampled process identity, foreground status, Windows
Responding, and cumulative CPU time approximately once per second. CPU times below are sums of process CPU time, not elapsed time or machine-wide CPU percentages. Both scenarios used an actual ephemeral app-server turn and observedturn/completedwith statuscompleted.node_repl/jscall usedsky.list_windows()and thensky.get_window_state()on the selected Word window, withinclude_text: trueandinclude_screenshot: false. The call succeeded and returned an accessibility tree. After the turn completed, Word remained foreground andResponding=truein all 121 samples over approximately 120 seconds. Word accumulated 71.46875 s CPU; the ordinary helper accumulated 42.234375 s CPU and was present in all samples.access = "deny"in the guest's actual user configuration. A new app-server'sconfig/readconfirmed the rule in both the user layer and effective configuration; no-coverride was used. Set up the Word foreground state before enforcing the rule. In a real turn under the rule, select an existing visible, unminimized Notepad window and callsky.get_window_state()for Notepad only. Do not call Computer Use on Word. The Notepad call succeeded, although its accessibility result wasnull. After the turn completed, Word remained foreground andResponding=truein all 122 samples over 121.006 seconds. Word accumulated 73.71875 s CPU; the ordinary helper accumulated 41.8125 s CPU and was present in all samples.Responding=truein all 31 samples and accumulated 0.046875 s CPU; no ordinary helper was observed in the samples. The original guest configuration, owner and ACL were independently verified restored. Other sessions were not stopped.The A and B operations target different applications and are not identical workloads. The key observation is that the validated user-profile deny configuration did not prevent sustained Word CPU use in the described B scenario.
config/readestablishes the app-server configuration; it does not prove what configuration the native helper loaded or how it applied the rule. The Notepad result does not establish its document contents, typing, or scrolling.An additional real-turn probe confirmed that the packaged metadata builder produced nonempty
session_idandturn_id. After a successful Notepad call and completed turn, Word accumulated 35.265625 s CPU and the ordinary helper 22.5 s over approximately 61 seconds; Word CPU was 0.015625 s over the following approximately 30 seconds after the test app-server ended and the ordinary helper disappeared. The metadata values were not compared with the notification identifiers, and delivery or handling ofend_turnwas not established.Earlier, a restricted real UI Automation trace captured version-0 events from a candidate helper but did not find matching Word peer events. It therefore did not prove direct helper-to-Word calls or their absence. No claim is made that the foreground-monitor path in #43692 is the proven cause here. Windows
Responding=truedoes not establish acceptable typing or scrolling latency, and one-second samples cannot rule out shorter events between samples.Expected behavior and request to maintainers
With Word excluded, a Computer Use turn operating on another permitted application should not leave Word under sustained accessibility-related load. After a completed turn, background monitoring should release or idle resources that are no longer needed. Please investigate whether the native foreground-monitor path checks the effective user and managed app policies before constructing a UIA cache, how the helper receives those policies, and whether turn completion stops or limits the monitor. Please provide a supported fix or documented per-app exclusion that preserves Computer Use for other windows, plus a way to verify the effective native policy and lifecycle.
No credentials, account information, personal paths, document text, screenshots, raw event traces, or unrelated application contents are included in this comment.