BigPizzaV3/CodexPlusPlus · error

Unsupported native entry point

Error message

Unsupported native entry point

What it means

The cua_repl server must be launched with exactly one argument: the cached entry script <runtime_root>/<key>/bin/node_modules/@oai/cua-repl/bin/cua-repl.mjs. If args contains extra flags, a different script, or a different number of arguments, the server would run an entry point Codex++ did not prepare/patch, so the descriptor is rejected.

Solutions

  1. Set args to exactly ["<runtime_root>/<key>/bin/node_modules/@oai/cua-repl/bin/cua-repl.mjs"]
  2. Remove any extra CLI flags from the args array in .mcp.json
  3. Reinstall the unified-computer-use plugin to regenerate a correct descriptor

Example fix

// before
"args": [".../cua-repl.mjs", "--inspect"]
// after
"args": [".../cua-repl.mjs"]
Defensive patterns

Strategy: validation

Validate before calling

let args = descriptor["mcpServers"]["cua_repl"]["args"].as_array().unwrap();
let expected = runtime_root.join(key).join("bin/node_modules/@oai/cua-repl/bin/cua-repl.mjs");
if args.len() != 1 || args[0].as_str() != Some(expected.to_str().unwrap()) { eprintln!("unexpected cua_repl args"); }

Type guard

fn entry_point_is_expected(args: &Value, root: &Path, key: &str) -> bool {
    let expected = root.join(key).join("bin/node_modules/@oai/cua-repl/bin/cua-repl.mjs");
    args.as_array()
        .map(|a| a.len() == 1 && a[0].as_str().map(Path::new) == Some(expected.as_path()))
        .unwrap_or(false)
}

Prevention

When it happens

Trigger: selected_key inspects mcpServers.cua_repl.args and finds args.len() != 1 or args[0] not equal to the expected cua-repl.mjs path under the runtime key's bin directory — e.g. someone appended --inspect or pointed at a system-installed cua-repl.

Common situations: Debugging additions like --inspect or --trace-warnings left in args; pointing args at a globally installed cua-repl.mjs; plugin version drift changing the arg list; copied descriptors from other setups.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/4784577c739d879e. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/native_browser.rs:328

        env["NODE_REPL_TRUSTED_SERVICES"]
            .as_str()
            .context("Missing native service map")?,
    )?;
    ensure!(
        services["browser"] == "@oai/browser-desktop/service",
        "Original browser service is not selected"
    );
    ensure!(
        env["CUA_REPL_ENABLED_SURFACES"].as_str() == Some("browser"),
        "Unsupported native surface selection"
    );
    let args = server["args"]
        .as_array()
        .context("Missing native entry point")?;
    let entry = root
        .join(key)
        .join("bin/node_modules/@oai/cua-repl/bin/cua-repl.mjs");
    ensure!(
        args.len() == 1 && args[0].as_str().map(Path::new) == Some(entry.as_path()),
        "Unsupported native entry point"
    );
    plain_path(&node)?;
    Ok(key.to_owned())
}

fn discover(paths: &BrowserPaths) -> Result<Option<String>> {
    let plugins = paths
        .codex_home
        .join("plugins/cache/openai-bundled/unified-computer-use");
    plain_path(&plugins)?;
    if !plugins.exists() {
        return Ok(None);
    }
    let mut keys = BTreeSet::new();
    let mut count = 0;
    for entry in fs::read_dir(plugins)? {

View on GitHub (pinned to b1ed92e5e4)