Skip to content

Windows Codex app rewrites node_repl / Computer Use config on startup or plugin update, breaking @oai/sky resolution #26190

@ly283370126-cpu

Description

@ly283370126-cpu

Problem:
Codex Windows app/plugin update rewrites node_repl configuration so Computer Use starts without NODE_REPL_NODE_MODULE_DIRS, causing @oai/sky import to fail.

Title:
Windows Codex app rewrites node_repl / Computer Use config on startup or plugin update, breaking @oai/sky resolution

Component
Codex Windows App, plugins, Computer Use, node_repl MCP, config.toml generation.

Environment
OS: Windows 11 CoreCountrySpecific, 10.0.26200, zh-CN
Codex CLI: codex-cli 0.136.0-alpha.2
Codex app package observed on PATH: OpenAI.Codex_26.601.2237.0_x64__2p2nqsd0c76g0
Codex executable: C:\Users\李闫\AppData\Local\OpenAI\Codex\bin\716dda49c14d31a0\codex.exe
CODEX_HOME: C:\Users\李闫.codex
User profile path contains non-ASCII characters: C:\Users\李闫
Computer Use plugin version observed: 26.601.21317
Computer Use plugin path exists:
C:\Users\李闫.codex\plugins\cache\openai-bundled\computer-use\26.601.21317
Problem
Codex rewrites ~/.codex/config.toml on startup or plugin update. After restart/update, Computer Use can fail because node_repl starts without a valid NODE_REPL_NODE_MODULE_DIRS, so @oai/sky cannot be resolved.

This affects Computer Use because the Computer Use plugin depends on the node_repl runtime being able to resolve its vendored @oai/sky package.

Observed bad state
A backup created immediately before repair contained:

js_repl = false
apps = true
NODE_REPL_NODE_MODULE_DIRS = ""
The current repaired state contains:

js_repl = true
apps = true

[mcp_servers.node_repl]
command = 'C:\Users\李闫\AppData\Local\OpenAI\Codex\bin\34ab3e1324cc55b5\node_repl.exe'

[mcp_servers.node_repl.env]
NODE_REPL_NODE_MODULE_DIRS = 'C:\Users\李闫.codex\plugins\cache\openai-bundled\computer-use\26.601.21317\node_modules'
CODEX_HOME = 'C:\Users\李闫.codex'
Evidence
In a running node_repl session, before adding the module directory manually:

await import("@oai/sky")
failed with:

Module not found: @oai/sky
After adding the current Computer Use node_modules directory manually through js_add_node_module_dir, the same import succeeded and exported sky.

This proves the Computer Use plugin files are present and valid. The failure is in startup/config/env propagation, not in the package contents.

Expected behavior
Codex should not overwrite user/plugin-required node_repl MCP environment configuration with empty or stale values.

On startup and plugin update, Codex should:

preserve existing valid mcp_servers.node_repl.env.NODE_REPL_NODE_MODULE_DIRS;
or regenerate it to the current installed Computer Use plugin version;
validate that NODE_REPL_NODE_MODULE_DIRS exists before writing it;
validate that notify points to an existing codex-computer-use.exe;
avoid writing config that breaks Computer Use after restart.
Reproduction
Use Codex Windows app with Computer Use enabled.

Ensure ~/.codex/config.toml has a valid mcp_servers.node_repl.env.NODE_REPL_NODE_MODULE_DIRS.

Restart Codex app or allow plugin update.

Observe config.toml or the running node_repl environment no longer has the valid Computer Use module directory.

In node_repl, run:

await import("@oai/sky")
It fails with:

Module not found: @oai/sky
Diagnostics
codex doctor --json reports:

codexVersion: 0.136.0-alpha.2
overallStatus: warning
CODEX_HOME: C:\Users\李闫.codex
config.toml parse: ok
mcp servers: 2
enabled feature flags include: apps, browser_use, browser_use_external, computer_use, plugins
system: Windows 10.0.26200 (Windows 11 CoreCountrySpecific) [64-bit], zh-CN
The only warning in this run was update probing:

latest version probe: curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed
Provider reachability and WebSocket reachability were OK in this run.

Notes
The console may render the non-ASCII username path incorrectly in some PowerShell output, but byte-level inspection of config.toml confirms the current repaired path is the correct C:\Users\李闫....

The important bug is not terminal display encoding. The important bug is that Codex startup/plugin update can write or propagate an empty/stale NODE_REPL_NODE_MODULE_DIRS, causing Computer Use's @oai/sky import to fail until the module path is manually re-added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingcomputer-useconfigIssues involving config.toml, config keys, config merging, or config updatesmcpIssues related to the use of model context protocol (MCP) serverswindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions