{"record":{"id":"225d20bc99233fb3","repo":"BigPizzaV3/CodexPlusPlus","slug":"original-browser-service-is-not-selected","errorCode":null,"errorMessage":"Original browser service is not selected","messagePattern":"Original browser service is not selected","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/native_browser.rs","lineNumber":314,"sourceCode":"        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()\n        .context(\"Missing native entry point\")?;\n    let entry = root\n        .join(key)\n        .join(\"bin/node_modules/@oai/cua-repl/bin/cua-repl.mjs\");\n    ensure!(\n        args.len() == 1 && args[0].as_str().map(Path::new) == Some(entry.as_path()),\n        \"Unsupported native entry point\"\n    );\n    plain_path(&node)?;","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/native_browser.rs#L296-L332","documentation":"selected_key requires that the descriptor's NODE_REPL_TRUSTED_SERVICES JSON map selects the original @oai/browser-desktop/service for the browser surface. This guarantee lets Codex++ safely patch and restore the adapter: if a different (already-modified or third-party) browser service is configured, patching it would corrupt an unknown artifact, so discovery rejects the descriptor.","triggerScenarios":"selected_key reads env.NODE_REPL_TRUSTED_SERVICES from the cua_repl server descriptor and the services[\"browser\"] value is anything other than \"@oai/browser-desktop/service\" — e.g. the map was edited, the plugin selected an alternate browser backend, or a newer plugin version renamed the service.","commonSituations":"Manual tweaks to NODE_REPL_TRUSTED_SERVICES to enable non-default backends; plugin upgrades that change service identifiers; experimenting with alternative browser service implementations inside the cua_repl env.","solutions":["Reset NODE_REPL_TRUSTED_SERVICES so browser maps to \"@oai/browser-desktop/service\"","Reinstall the unified-computer-use plugin to restore the default trusted-services map","Remove stale plugin descriptor directories so only the stock descriptor is discovered"],"exampleFix":"// before\n\"NODE_REPL_TRUSTED_SERVICES\": \"{\\\"browser\\\":\\\"@vendor/alternate-browser\\\"}\"\n// after\n\"NODE_REPL_TRUSTED_SERVICES\": \"{\\\"browser\\\":\\\"@oai/browser-desktop/service\\\"}\"","handlingStrategy":"validation","validationCode":"let services: Value = serde_json::from_str(env[\"NODE_REPL_TRUSTED_SERVICES\"].as_str().unwrap_or(\"\"))?;\nif services[\"browser\"] != \"@oai/browser-desktop/service\" { eprintln!(\"non-default browser service selected\"); }","typeGuard":"fn selects_original_browser_service(env: &Value) -> bool {\n    env[\"NODE_REPL_TRUSTED_SERVICES\"].as_str()\n        .and_then(|s| serde_json::from_str::<Value>(s).ok())\n        .map(|v| v[\"browser\"] == \"@oai/browser-desktop/service\")\n        .unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Do not customize NODE_REPL_TRUSTED_SERVICES if you rely on Codex++ browser patching","After plugin upgrades, diff the descriptor env against defaults","Restore the stock descriptor whenever you experiment with alternate browser backends"],"tags":["config","native-browser","mcp-descriptor","unsupported-configuration"],"backgroundTag":"unsupported-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"}