Client or integration
Codex App
Provider or upstream service
cursor
OpenCodex version
2.18.0 (local proxy on localhost:10100; worktree HEAD e2ef24a)
Endpoint or capability
Cursor adapter tool-result replay for Codex Desktop Computer Use / node_repl. Observed on /v1/responses turns routed to cursor/grok-4.6.
Current behaviour
A Codex App session routed through the OpenCodex Cursor adapter can call every Computer Use API successfully, then lose the result on the next turn.
Live probe on 2026-08-17 (macOS, Chrome already open):
list_apps, get_app_state, screenshot emit, click, set_value, type_text, select_text, press_key, scroll, drag, and perform_secondary_action all succeeded when invoked through mcp__node_repl__js.
- The next outer
exec wrapper often returned empty output even though the nested Computer Use call completed.
- Full AX trees and JPEG screenshots truncated in the model-visible tool result (
original token count: 43857 / 36963, then …8039 tokens truncated…).
- After Chrome's focused window/tab changed, later actions failed with:
SkyComputerUseError: The user changed '/Applications/Google Chrome.app'. Re-query the latest state with `get_app_state` before sending more actions.
- After a node_repl reset or a failed nested call, the same session then reported
sky is not defined and Identifier 'x' has already been declared.
OpenCodex itself stayed healthy: dashboard localhost:10100/#logs showed HTTP 200 for the Cursor-routed turns. The break is in how large Computer Use / node_repl results come back through the Cursor adapter, not in the proxy being down.
The Cursor adapter already bounds replayed history to CURSOR_EXTERNAL_ROOT_BYTE_LIMIT = 512 * 1024 and can truncate or drop tool-result blobs (src/adapters/cursor/protobuf-request.ts, truncateToolResultBlob). A Computer Use get_app_state payload is a full accessibility tree plus a JPEG screenshot; that is enough to hit the budget and leave the next turn with an empty or head-only result.
Expected behaviour
When Codex Desktop Computer Use / node_repl is used on a Cursor-routed turn:
- A completed nested
mcp__node_repl__js call must surface a non-empty tool result to the model. Empty outer-exec wrappers should not be treated as success.
- Oversized Computer Use payloads (AX tree + screenshot) should be reduced to a usable summary that still names the focused window, URL, and the action error, instead of disappearing or arriving as a truncated binary dump.
- If Chrome state changed, the adapter/tool result should include the re-query instruction and the new focused element, not an empty cell that causes the model to retry with stale element indexes.
- node_repl declaration collisions and lost
sky bindings should be reported as a recoverable tool error, not as a blank result.
Minimal redacted request or reproduction
1. Run OpenCodex 2.18.0 locally (`ocx` on port 10100).
2. Point Codex App at the local proxy and route the turn to cursor/grok-4.6.
3. Ask the model to inspect Chrome via Computer Use, then exercise every Computer Use API (list_apps, get_app_state, click, set_value, type_text, select_text, press_key, scroll, drag, perform_secondary_action, screenshot).
4. Observe:
- first successful get_app_state / screenshot tool result is truncated
- a later nested node_repl call returns empty outer-exec output
- changing the Chrome tab/window produces SkyComputerUseError: The user changed '/Applications/Google Chrome.app'
- a subsequent call in the same node_repl kernel fails with Identifier already declared or sky is not defined
5. Confirm the OpenCodex dashboard still logs those turns as HTTP 200.
Do not navigate the address bar, click bookmarks, stop the proxy, or star/unstar GitHub while reproducing. The failures above happen on read and low-impact UI actions.
Actual response or error
# empty outer exec after a completed nested Computer Use call
Script completed
Wall time 7.9 seconds
Output:
<empty>
# truncated Computer Use screenshot / AX tree
Warning: truncated output (original token count: 43857)
…8039 tokens truncated…
# Chrome state changed
SkyComputerUseError: The user changed '/Applications/Google Chrome.app'. Re-query the latest state with `get_app_state` before sending more actions.
# node_repl kernel collisions after reset / nested wrap
Identifier 'state' has already been declared
Identifier 'fs' has already been declared
sky is not defined
unsupported import in exec
Dashboard rows for the same window were HTTP 200 on cursor/grok-4.6, estimated usage, Cursor cache detail unreported.
Upstream documentation
No public Cursor Computer Use / root-replay specification. The OpenCodex Cursor adapter documents the replay budget and truncation marker in src/adapters/cursor/protobuf-request.ts:
CURSOR_EXTERNAL_ROOT_BLOB_LIMIT = 192
CURSOR_EXTERNAL_ROOT_BYTE_LIMIT = 512 * 1024
- truncation marker:
…[truncated for Cursor external replay budget]
Codex Desktop Computer Use is invoked only through mcp__node_repl__js importing @oai/sky. Outer code-mode exec cannot import @oai/sky (unsupported import in exec).
Related but not the same:
Suggested mapping or implementation notes
Likely OpenCodex-side fixes, in order:
- Detect Computer Use / node_repl results that are empty after a successful nested call and surface a structured error instead of replaying a blank tool result.
- Before Cursor root replay, compact Computer Use payloads: keep AX text / error / focused element, drop or downscale the screenshot when over budget, and keep the truncation marker visible to the model.
- Do not drop the active trailing Computer Use tool result when it is the only evidence the model has for the next action.
- Treat
The user changed '/Applications/Google Chrome.app' as a recoverable Computer Use error that forces get_app_state rather than as a silent empty cell.
Headless provider.desktopExecutor.computerUseCommand is a separate path (src/adapters/cursor/native-exec-desktop.ts) and was not used here. This report is the Codex Desktop Computer Use plugin flowing through the Cursor adapter.
Additional context and attachments
Worktree: /Users/jun/.codex/worktrees/7f9e/opencodex
Session: Codex App, Computer Use plugin, Chrome already running.
Proxy: OpenCodex 2.18.0 on localhost:10100, Cursor-routed grok-4.6.
I am not attaching screenshots or AX dumps because they contain local Chrome UI. The errors and dashboard HTTP 200s above are the reproducible signal.
Checks
Client or integration
Codex App
Provider or upstream service
cursor
OpenCodex version
2.18.0 (local proxy on localhost:10100; worktree HEAD e2ef24a)
Endpoint or capability
Cursor adapter tool-result replay for Codex Desktop Computer Use / node_repl. Observed on
/v1/responsesturns routed tocursor/grok-4.6.Current behaviour
A Codex App session routed through the OpenCodex Cursor adapter can call every Computer Use API successfully, then lose the result on the next turn.
Live probe on 2026-08-17 (macOS, Chrome already open):
list_apps,get_app_state, screenshot emit,click,set_value,type_text,select_text,press_key,scroll,drag, andperform_secondary_actionall succeeded when invoked throughmcp__node_repl__js.execwrapper often returned empty output even though the nested Computer Use call completed.original token count: 43857/36963, then…8039 tokens truncated…).sky is not definedandIdentifier 'x' has already been declared.OpenCodex itself stayed healthy: dashboard
localhost:10100/#logsshowed HTTP 200 for the Cursor-routed turns. The break is in how large Computer Use / node_repl results come back through the Cursor adapter, not in the proxy being down.The Cursor adapter already bounds replayed history to
CURSOR_EXTERNAL_ROOT_BYTE_LIMIT = 512 * 1024and can truncate or drop tool-result blobs (src/adapters/cursor/protobuf-request.ts,truncateToolResultBlob). A Computer Useget_app_statepayload is a full accessibility tree plus a JPEG screenshot; that is enough to hit the budget and leave the next turn with an empty or head-only result.Expected behaviour
When Codex Desktop Computer Use / node_repl is used on a Cursor-routed turn:
mcp__node_repl__jscall must surface a non-empty tool result to the model. Empty outer-execwrappers should not be treated as success.skybindings should be reported as a recoverable tool error, not as a blank result.Minimal redacted request or reproduction
Do not navigate the address bar, click bookmarks, stop the proxy, or star/unstar GitHub while reproducing. The failures above happen on read and low-impact UI actions.
Actual response or error
Dashboard rows for the same window were HTTP 200 on
cursor/grok-4.6, estimated usage, Cursor cache detail unreported.Upstream documentation
No public Cursor Computer Use / root-replay specification. The OpenCodex Cursor adapter documents the replay budget and truncation marker in
src/adapters/cursor/protobuf-request.ts:CURSOR_EXTERNAL_ROOT_BLOB_LIMIT = 192CURSOR_EXTERNAL_ROOT_BYTE_LIMIT = 512 * 1024…[truncated for Cursor external replay budget]Codex Desktop Computer Use is invoked only through
mcp__node_repl__jsimporting@oai/sky. Outer code-modeexeccannot import@oai/sky(unsupported import in exec).Related but not the same:
Suggested mapping or implementation notes
Likely OpenCodex-side fixes, in order:
The user changed '/Applications/Google Chrome.app'as a recoverable Computer Use error that forcesget_app_staterather than as a silent empty cell.Headless
provider.desktopExecutor.computerUseCommandis a separate path (src/adapters/cursor/native-exec-desktop.ts) and was not used here. This report is the Codex Desktop Computer Use plugin flowing through the Cursor adapter.Additional context and attachments
Worktree:
/Users/jun/.codex/worktrees/7f9e/opencodexSession: Codex App, Computer Use plugin, Chrome already running.
Proxy: OpenCodex 2.18.0 on localhost:10100, Cursor-routed
grok-4.6.I am not attaching screenshots or AX dumps because they contain local Chrome UI. The errors and dashboard HTTP 200s above are the reproducible signal.
Checks