Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

[Codex] Add browser use external feature flag (#20245)

khoi719431da6e2b
diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json
index 28c81d69c8..8bf457c2b0 100644
--- a/codex-rs/core/config.schema.json
+++ b/codex-rs/core/config.schema.json
@@ -373,6 +373,9 @@
"browser_use": {
"type": "boolean"
},
+ "browser_use_external": {
+ "type": "boolean"
+ },
"child_agents_md": {
"type": "boolean"
},
@@ -3390,6 +3393,9 @@
"browser_use": {
"type": "boolean"
},
+ "browser_use_external": {
+ "type": "boolean"
+ },
"child_agents_md": {
"type": "boolean"
},
diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs
index 5cc2055cb0..5c2a76eb81 100644
--- a/codex-rs/features/src/lib.rs
+++ b/codex-rs/features/src/lib.rs
@@ -172,6 +172,10 @@ pub enum Feature {
///
/// Requirements-only gate: this should be set from requirements, not user config.
BrowserUse,
+ /// Allow Browser Use integration with external browsers.
+ ///
+ /// Requirements-only gate: this should be set from requirements, not user config.
+ BrowserUseExternal,
/// Allow Codex Computer Use.
///
/// Requirements-only gate: this should be set from requirements, not user config.
@@ -914,6 +918,12 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::Stable,
default_enabled: true,
},
+ FeatureSpec {
+ id: Feature::BrowserUseExternal,
+ key: "browser_use_external",
+ stage: Stage::Stable,
+ default_enabled: true,
+ },
FeatureSpec {
id: Feature::ComputerUse,
key: "computer_use",
diff --git a/codex-rs/features/src/tests.rs b/codex-rs/features/src/tests.rs
index 0ed1d7ecc0..d1c0ae0c55 100644
--- a/codex-rs/features/src/tests.rs
+++ b/codex-rs/features/src/tests.rs
@@ -157,6 +157,13 @@ fn browser_controls_are_stable_and_enabled_by_default() {
assert_eq!(Feature::BrowserUse.default_enabled(), true);
assert_eq!(feature_for_key("browser_use"), Some(Feature::BrowserUse));
+ assert_eq!(Feature::BrowserUseExternal.stage(), Stage::Stable);
+ assert_eq!(Feature::BrowserUseExternal.default_enabled(), true);
+ assert_eq!(
+ feature_for_key("browser_use_external"),
+ Some(Feature::BrowserUseExternal)
+ );
+
assert_eq!(Feature::ComputerUse.stage(), Stage::Stable);
assert_eq!(Feature::ComputerUse.default_enabled(), true);
assert_eq!(feature_for_key("computer_use"), Some(Feature::ComputerUse));