{"record":{"id":"b14946f8342f7e40","repo":"BigPizzaV3/CodexPlusPlus","slug":"conflicting-native-worker-selection","errorCode":null,"errorMessage":"Conflicting native worker selection","messagePattern":"Conflicting native worker selection","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/native_browser.rs","lineNumber":305,"sourceCode":"        .strip_prefix(root)\n        .context(\"Native Node is outside the runtime cache\")?;\n    let parts: Vec<_> = relative.components().collect();\n    ensure!(parts.len() == 3, \"Unexpected native runtime layout\");\n    let key = parts[0]\n        .as_os_str()\n        .to_str()\n        .context(\"Invalid runtime key\")?;\n    ensure!(\n        key_valid(key) && relative == Path::new(key).join(\"bin/node.exe\"),\n        \"Unexpected native runtime layout\"\n    );\n    let env = &server[\"env\"];\n    ensure!(\n        env[\"NODE_REPL_NODE_PATH\"].as_str().map(Path::new) == Some(node.as_path()),\n        \"Conflicting native Node selection\"\n    );\n    let worker = root.join(key).join(\"bin/node_repl.exe\");\n    ensure!(\n        env[\"CUA_REPL_NODE_REPL_PATH\"].as_str().map(Path::new) == Some(worker.as_path()),\n        \"Conflicting native worker selection\"\n    );\n    let services: Value = serde_json::from_str(\n        env[\"NODE_REPL_TRUSTED_SERVICES\"]\n            .as_str()\n            .context(\"Missing native service map\")?,\n    )?;\n    ensure!(\n        services[\"browser\"] == \"@oai/browser-desktop/service\",\n        \"Original browser service is not selected\"\n    );\n    ensure!(\n        env[\"CUA_REPL_ENABLED_SURFACES\"].as_str() == Some(\"browser\"),\n        \"Unsupported native surface selection\"\n    );\n    let args = server[\"args\"]\n        .as_array()","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/native_browser.rs#L287-L323","documentation":"This error is thrown by selected_key while validating an .mcp.json plugin descriptor for the native browser runtime. The descriptor's CUA_REPL_NODE_REPL_PATH env var must point at the cached worker binary <runtime_root>/<key>/bin/node_repl.exe that corresponds to the runtime key derived from the command path. If it names a different node_repl.exe (another runtime key, an absolute system path, or a stale entry), the descriptor is internally inconsistent, so discovery refuses to select it.","triggerScenarios":"selected_key (called from discover during reconcile_locked/observation) parses a .mcp.json whose mcpServers.cua_repl.env.CUA_REPL_NODE_REPL_PATH resolves to a path other than runtime_root/<key>/bin/node_repl.exe — e.g. the env var was hand-edited, points to a previous runtime version, or to a globally installed node_repl.exe.","commonSituations":"Users who manually edited the plugin's .mcp.json; leftover descriptors from an older runtime version after an upgrade; a plugin generated by another tool that sets CUA_REPL_NODE_REPL_PATH to a system Node; copied config files between machines with different runtime caches.","solutions":["Delete the offending plugin descriptor directory under codex_home/plugins/cache/openai-bundled/unified-computer-use so only consistent descriptors remain","Reinstall/refresh the unified-computer-use plugin so the .mcp.json is regenerated with a matching CUA_REPL_NODE_REPL_PATH","Edit the .mcp.json so CUA_REPL_NODE_REPL_PATH exactly equals <runtime_root>/<key>/bin/node_repl.exe where <key> is the first path component under runtime_root in the command field"],"exampleFix":"// before (.mcp.json)\n\"env\": { \"CUA_REPL_NODE_REPL_PATH\": \"/usr/local/bin/node_repl.exe\" }\n// after\n\"env\": { \"CUA_REPL_NODE_REPL_PATH\": \"/home/user/.codex/browser-runtime/<key>/bin/node_repl.exe\" }","handlingStrategy":"validation","validationCode":"let expected_worker = runtime_root.join(key).join(\"bin/node_repl.exe\");\nif descriptor[\"mcpServers\"][\"cua_repl\"][\"env\"][\"CUA_REPL_NODE_REPL_PATH\"].as_str() != Some(expected_worker.to_str().unwrap()) {\n    eprintln!(\"descriptor CUA_REPL_NODE_REPL_PATH does not match cached worker for key {key}\");\n}","typeGuard":"fn worker_path_matches(env: &Value, root: &Path, key: &str) -> bool {\n    env[\"CUA_REPL_NODE_REPL_PATH\"].as_str()\n        .map(|p| Path::new(p) == root.join(key).join(\"bin/node_repl.exe\"))\n        .unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Never hand-edit .mcp.json env paths; let the plugin generate them","After runtime upgrades, verify CUA_REPL_NODE_REPL_PATH points into the new runtime key directory","Keep one plugin version installed to avoid mixed-key descriptors"],"tags":["config","native-browser","mcp-descriptor","path-mismatch"],"backgroundTag":"invalid-config-value","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}