Idle computer-use process continuously handles UIA events, causing system-wide freezes

Open
#36,833 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start by reproducing the idle-session freeze on Windows and reviewing the WPR evidence around codex-computer-use.exe, WinEventCallbackWorkItem, ProxyEventManager::OnWinEvent, and the GetPattern/GetProperty/GetText calls. Trace the helper's computer-use lifecycle and UIA subscription handling; done means inactive sessions no longer process UIA events, the helper exits after use, and Edge, DWM, and input remain responsive during AX updates.

Written by the indexing model from the issue text.

Description

app bug computer-use Papercuts 2026 performance windows-os
What version of the Codex App are you using (From “About Codex” dialog)?

26.727.51351

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

• Title: Idle computer-use process continuously handles UIA events, causing system-wide
freezes

codex-computer-use.exe remains running and subscribed to Windows UI Automation events even
when computer-use is not being invoked. When Edge performs frequent DOM/Accessibility tree
updates, the process handles every WinEvent/UIA event and repeatedly queries patterns,
properties, and text. This creates heavy Win32k contention and can freeze Edge, DWM, mouse
input, and the entire desktop for several seconds.

Expected behavior:

  • Do not subscribe to or process UIA/AX events unless computer-use is actively running.
  • Unsubscribe and terminate the helper process after a computer-use session ends.
  • Coalesce, throttle, or drop redundant events during frequent AX tree updates.
  • UIA processing must not block the browser, DWM, or system input.

WPR evidence shows codex-computer-use.exe repeatedly executing WinEventCallbackWorkItem,
ProxyEventManager::OnWinEvent, and GetPattern/GetProperty/GetText, while Edge heavily
executes HandleAXEvents and NtUserNotifyWinEvent.

• 标题:computer-use 空闲时持续监听 UIA 事件,导致系统级卡顿

Codex 的 codex-computer-use.exe 在没有调用 computer-use 时仍然驻留,并持续响应 Edge 的
Accessibility/AX 树更新。当网页频繁更新大量 DOM 时,它会处理每个 WinEvent/UIA 事件并反向查
询 Pattern、Property 和 Text,造成 Edge 与 Win32k 资源争用,最终导致 DWM、鼠标及整机卡顿十
几秒。

期望行为:

  • 未调用 computer-use 时,不应订阅或响应 UI Automation/AX 事件。
  • computer-use 调用结束后,应立即取消订阅并退出辅助进程。
  • AX 树频繁更新时,应合并、限流或丢弃重复事件,不能逐事件同步查询。
  • UIA 处理不应阻塞浏览器、DWM 或系统输入线程。

WPR ETL 显示卡顿期间 codex-computer-use.exe 持续执行 WinEventCallbackWorkItem、
ProxyEventManager::OnWinEvent、GetPattern/GetProperty/GetText,同时 Edge 大量执行
HandleAXEvents 和 NtUserNotifyWinEvent。停止该进程并重启 Edge 后可用于验证。

What steps can reproduce the bug?

Feedback ID: no-active-thread-019fcacf-0151-7e91-8ef8-81b9e01c0869

What is the expected behavior?
  • Do not subscribe to or process UIA/AX events unless computer-use is actively running.
  • Unsubscribe and terminate the helper process after a computer-use session ends.
  • Coalesce, throttle, or drop redundant events during frequent AX tree updates.
  • UIA processing must not block the browser, DWM, or system input.
Additional information

• 1. Start Codex and invoke computer-use once so that codex-computer-use.exe is launched.
2. Stop using computer-use. The helper process remains running and subscribed to Windows
UI Automation events.

  1. Open the following page in Microsoft Edge.
  2. Wait for the periodic DOM refresh, or click “Refresh”.
  3. Edge and sometimes the entire desktop freeze for several seconds. Mouse movement and
    DWM responsiveness are also affected.

The issue occurs while no computer-use action is active. WPR shows the idle codex-
computer-use.exe repeatedly handling WinEventCallbackWorkItem,
ProxyEventManager::OnWinEvent, and GetPattern/GetProperty/GetText. At the same time, Edge
repeatedly executes HandleAXEvents, UiaRaiseStructureChangedEvent, and
NtUserNotifyWinEvent, causing heavy Win32k contention and system-wide input freezes.

Expected behavior: when computer-use is inactive, the helper should unsubscribe from UIA
events and terminate. Frequent AX updates should also be coalesced or throttled rather
than processed synchronously one by one.

Session ID: Not available
Token-limit usage: Not applicable
Context-window usage: Not applicable

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.