Repository navigation
Description
What variant of Codex are you using?
Windows Codex desktop app; Windows 11 and Debian WSL2.
What feature would you like to see?
Please expose and integrate multiple execution targets in one Windows desktop agent conversation, including native Windows Computer Use and independently sandboxed Windows and WSL execution. The default agent environment should remain a default, not restrict every tool invocation.
A typical workflow is: inspect a website with Windows Computer Use; read and modify source inside Debian WSL; execute tests and inspect services on a remote Linux server over SSH; return to the Windows browser to verify results. Keep the same conversation, task context, and authorized outputs throughout, without changing global agent settings or restarting.
For this workflow, the desktop agent's main value over an existing VS Code/WSL coding setup is its ability to combine development and interaction with the user's Windows applications. WSL shell access alone does not provide a correctly bound Windows GUI runtime, per-operation target selection, or independent permissions for each execution host. Invoking wsl.exe, ssh, or docker exec inside a shell can help with individual commands, but does not by itself establish those properties for file, edit, MCP, and Computer Use operations.
Existing foundation and evidence boundaries
This request builds on existing public core capabilities; it does not require rewriting the entire Codex architecture. At public source commit 97771b1d78cf6366bc3946fe9e4bbca4ebee31d1:
| Capability | Evidence and status |
|---|---|
| Multiple attached environments | thread/start.environments and turn/start.environments exist and are explicitly experimental; selection includes environment IDs and environment-specific cwd/workspace roots. Protocol, thread, turn. |
| Per-command routing | Tool planning exposes environment_id when multiple environments are selected; unified exec routes through the selected target. Tool plan, handler. |
| Executor registration | The exec-server environment registry supports configured executors. Registration. An offline local probe successfully queried two Linux executors in one app-server; an unknown ID was rejected with -32600. This was not a model turn or a heterogeneous Windows/Linux test. |
| Environment-aware MCP | Public configuration supports environment bindings and MCP calls select the environment cwd. Configuration, MCP call. This does not establish a supported desktop mechanism to remap the trusted Computer Use runtime. |
| Environment-scoped permissions | Turn context, unified-exec runtime and existing multi-executor sandbox tests provide relevant mechanisms. Turn context, runtime, tests. Independent Windows/Linux enforcement was not demonstrated in our desktop test. |
The Windows documentation describes changing the default agent host with a restart, separately from the integrated terminal. This does not prove that every tool must use that default. Public-source capabilities must not be assumed enabled or correctly integrated in the installed proprietary desktop client.
In an affected desktop task, ordinary Debian shell execution worked after a separate sandbox-helper repair, but actual Computer Use initialization still failed with MCP -32602: Windows-native node_repl.exe rejected POSIX sandboxCwd metadata. A subsequent user-provided desktop screenshot reported no environment_id in its exec_command schema and no separately routable Windows shell. That screenshot was not independently replayed and its raw tool trace was unavailable. An independent offline Node REPL probe reproduced the URI rejection before JavaScript executed. These observations establish the tested failure, not the absence of this functionality in every desktop configuration or release.
The gap is a supported, working desktop workflow that attaches both targets and gives trusted Windows Computer Use a consistent Windows execution context regardless of WSL project location. Please clarify any existing supported mechanism before adding new APIs. The exact proprietary routing defect and required desktop code change remain unverified.
Architectural requirements
- Support Windows, named WSL distributions, containers, and remote executors through the existing environment model. Select the target explicitly for each operation; show it in traces, file diffs, and approvals. Reject unknown or unavailable targets without silently falling back to another host.
- Keep each target's cwd, filesystem path convention, workspace roots, launcher, and sandbox metadata consistent. A POSIX file URI must not be treated as Windows-native; a UNC/drive URI must not be treated as Linux-native. Converting only
sandboxCwdis insufficient if policy roots and the execution host still disagree. - Bind native Windows Computer Use to Windows with its own control cwd and applicable app approvals, independent of the WSL project's cwd. Keep Linux source operations on the Linux executor. Preserve normal Computer Use authorization and foreground interaction rules.
- Separate credentials, filesystem grants, network policies, and approvals by environment and operation. A Windows grant must not authorize Linux, container, or remote access. Shared physical files and mount aliases must not expand policy implicitly.
- Transfer only authorized information. Passing permitted text results through task context is enough for the initial demonstration. Copying files or accessing services across environments must satisfy source-read, destination-write, and applicable network permissions; credentials must not be copied implicitly.
- Define attach/detach, runtime compatibility, reconnection, cancellation, and resume behavior. Retain target identity in task history, report lost environments clearly, and do not retry an action on a different target. Revalidate relevant permissions when reconnecting.
- Preserve existing single-environment behavior and defaults. Make multi-target attachment additive; explain capability or version limitations without requiring executable overrides or installed-runtime replacement.
- Add automated packaged-desktop integration and security tests for interleaving Windows/WSL/GUI operations, containers and remote executors, reconnect/resume, concurrent independent commands, URI conventions, spaces, mount aliases, symlinks/junctions, and legacy helper cleanup. Test explicit denial as well as success.
Acceptance criteria
In one Windows desktop conversation, using disposable fixtures and normal sandbox permissions:
- Execute native Windows PowerShell and identify its target.
- Execute Debian WSL Bash and read a fixture proof from the Linux workspace.
- Use actual Windows Computer Use to interact with a browser and verify that proof visibly.
- Execute another WSL command and inspect its output.
- Preserve the same conversation and task context throughout.
- Enforce separate Windows and Linux sandbox permissions: allowed fixture writes succeed on each host and out-of-root writes fail.
- Reject unauthorized cross-environment filesystem and network access, including mount/alias escape attempts and reuse of another environment's approval.
- Complete without changing global agent settings or restarting.
Extend coverage to a container and an SSH executor, including disconnect/reconnect and rejection of unavailable targets. Shelling into another host or passing URI validation alone is not a successful end-to-end test.
Additional information
Related requests: #23071 addresses per-project profiles and concurrent chats; #23074 addresses multiple SSH contexts in one thread; #28205 addresses CLI/TUI runtime targets including SSH/Docker. This proposal focuses on desktop integration of Windows Computer Use with Windows/WSL targets in the same conversation. Discussion #24976 discusses the broader desktop/WSL support boundary.
Bug evidence remains in existing threads: shell-helper root-cause report and verification, Computer Use follow-up, #49904, and WSL browser availability #25301 / #44253. Helper recovery does not repair Computer Use, and fixing URI rejection alone would not establish this architecture.
Regression patches: the helper patch backports an upstream strategy; the URI patch only adds host-boundary tests and does not fix the proprietary Node REPL. No sandbox-validation bypass or proprietary binary patch is proposed.
Activity