{"record":{"id":"accac6a89a9d1379","repo":"BigPizzaV3/CodexPlusPlus","slug":"unsupported-native-surface-selection","errorCode":null,"errorMessage":"Unsupported native surface selection","messagePattern":"Unsupported native surface selection","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/native_browser.rs","lineNumber":318,"sourceCode":"    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)?;\n    Ok(key.to_owned())\n}\n\nfn discover(paths: &BrowserPaths) -> Result<Option<String>> {","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/native_browser.rs#L300-L336","documentation":"Codex++ only supports patching the native browser runtime when the cua_repl server enables exactly the \"browser\" surface (CUA_REPL_ENABLED_SURFACES=browser). Any other surface selection (e.g. multiple surfaces or an unsupported one) means the patched service file would be used in an untested configuration, so the descriptor is rejected during discovery.","triggerScenarios":"selected_key checks env.CUA_REPL_ENABLED_SURFACES in the .mcp.json descriptor and its value is not exactly the string \"browser\" — for example \"browser,editor\", \"computer-use\", or an empty value.","commonSituations":"Users enabling extra cua_repl surfaces to access other REPL features; plugin templates that list multiple surfaces; partial manual edits of the descriptor env block.","solutions":["Set CUA_REPL_ENABLED_SURFACES to exactly \"browser\" in the descriptor's env","Reinstall the plugin so the default env (CUA_REPL_ENABLED_SURFACES=browser) is restored","If other surfaces are needed, run them from a separate descriptor not managed by Codex++ discovery"],"exampleFix":"// before\n\"CUA_REPL_ENABLED_SURFACES\": \"browser,editor\"\n// after\n\"CUA_REPL_ENABLED_SURFACES\": \"browser\"","handlingStrategy":"validation","validationCode":"if env[\"CUA_REPL_ENABLED_SURFACES\"].as_str() != Some(\"browser\") {\n    eprintln!(\"only the 'browser' surface is supported by Codex++ native browser patching\");\n}","typeGuard":"fn browser_surface_only(env: &Value) -> bool {\n    env[\"CUA_REPL_ENABLED_SURFACES\"].as_str() == Some(\"browser\")\n}","tryCatchPattern":null,"preventionTips":["Keep CUA_REPL_ENABLED_SURFACES=browser when using Codex++ managed runtimes","Run experimental surface configurations outside the managed plugin cache","Re-check env after plugin template updates"],"tags":["config","native-browser","unsupported-configuration","env-var"],"backgroundTag":"invalid-env-var-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"}