Windows Computer Use can reacquire foreground input after node_repl resets without a revocable single-controller lease

Open 💬 3 comments Opened Aug 6, 2026 by cttsai1985
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using?

Codex Desktop 26.730.8199.0; bundled Computer Use plugin 26.730.61639.

What platform is your computer?

Windows 11 x64.

What issue are you seeing?

On Windows, a Computer Use task can repeatedly reset node_repl, import @oai/sky again, create another transport, and continue issuing foreground input without a single revocable controller lifecycle.

During the observed run, desktop redraw and window switching became severely delayed and the desktop sometimes appeared frozen. Pressing Escape sometimes released visible updates. Explicitly instructing the task to stop caused it to close the transport and stop foreground input. Restarting Windows later cleared the accumulated state, but reboot is not a fix.

This report is about the Computer Use transport lifecycle and foreground-input boundary, not the GPU/display driver.

What steps can reproduce the bug?

  1. Start a Windows Computer Use task for a desktop application.
  2. Import @oai/sky and create/use its Windows transport.
  3. Call node_repl/js_reset.
  4. Import @oai/sky again and reacquire the transport without a new user grant.
  5. Repeat the reset/reacquisition cycle while issuing UI actions.
  6. Mix fresh observations with repeated fixed-coordinate input or another Windows UI-input mechanism.
  7. Observe that foreground input can continue across resets without one auditable owner or revocation boundary.

In the observed case, one task repeated this cycle several times over approximately eight minutes. Repository instructions were not an enforcement boundary because the runtime still allowed direct transport recreation.

What is the expected behavior?

  • A current-turn grant naming the app and action should be required before @oai/sky creates a Windows input transport.
  • One foreground maintenance window should own exactly one persistent node_repl / Sky transport and one controller.
  • js_reset should close and revoke the existing transport and must not permit silent reacquisition.
  • User input, Escape/stop, turn interruption, unknown focus, timeout, or transport failure should revoke the grant and prevent automatic reacquisition.
  • The runtime should reject competing foreground-input mechanisms in the same turn.
  • Input should be derived from a fresh returned-window observation; stale coordinates should not remain valid after state changes.
  • The lifecycle should expose auditable grant, transport-start, action, stop, and revocation events.

Additional information

Local repository rules can tell an agent not to reset/recreate transports or mix input methods, but they cannot enforce this boundary when the current plugin imports @oai/sky directly. The boundary needs to exist in the runtime.

Related but distinct:

  • #37013: stale node_repl execution context across Computer Use calls
  • #37180: missing approval prompt and node_repl exec context not found

Those reports cover nearby transport/context failures, but not revocation and repeated foreground-input reacquisition after js_reset.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 22 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #36958
  • #36267

Powered by Codex Action

jiangyuShiro · 21 days ago

I can confirm that resetting the Computer Use session is not a reliable recovery on Windows: in a separate task using Codex 26.730.8199.0 / Computer Use 26.730.61639 / @oai/sky 0.6.2, reset and retry still left desktop control unusable, with the helper failing on subsequent app/window operations. I did not observe the foreground-input reacquisition or freeze described here, so this is only a related reset/lifecycle observation, not a claim of identical reproduction.

M-T-D-N · 4 days ago

PR #40009 adds a turn-end Stop hook for node_repl.turn_ended, which improves cleanup when a turn finishes. However, it does not provide a supported way to temporarily release foreground control while the same turn remains active.

The missing workflow is:

GUI work → release foreground control → continue code/build/test using non-UI tools → reacquire foreground control → continue GUI work

Please consider an explicit foreground-control lease lifecycle:

  • release_foreground_control() should immediately revoke the current input lease, close UI-input transports, and visibly mark Computer Use as released.
  • acquire_foreground_control(target_app, reason) should require a fresh grant before UI actions resume.
  • Continuing non-UI work while released must not silently recreate an @oai/sky transport.
  • js_reset, focus changes, user input, Escape, or Stop should revoke the lease or prevent automatic reacquisition.
  • The UI should expose active/released state and auditable grant, release, and reacquisition events.

AGENTS.md instructions cannot enforce this boundary because the runtime can recreate the transport. This needs a runtime/API-level control boundary.

AI disclosure

At the user's direction, this feature request was investigated, drafted, and posted by an AI agent (OpenAI Codex) on the user's behalf. The user authorized the submission and completed GitHub authentication.