From 7730fb3ab8d784788aa0c495265cbdb28a273ab9 Mon Sep 17 00:00:00 2001 From: Leo Shimonaka Date: Wed, 22 Apr 2026 22:49:26 -0700 Subject: [PATCH] Add computer_use feature requirement key (#19071) ## Summary - add the `computer_use` requirements-only feature key - include it in generated config schema output - cover the new key in feature metadata tests ## Testing - `cargo test -p codex-features` - `just write-config-schema` - `just fmt` - `just fix -p codex-features` cc @xl-openai --------- Co-authored-by: Dylan Hurd --- codex-rs/core/config.schema.json | 6 ++++++ codex-rs/features/src/lib.rs | 10 ++++++++++ codex-rs/features/src/tests.rs | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 64aa3e5f1..1223b45a6 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -378,6 +378,9 @@ "collaboration_modes": { "type": "boolean" }, + "computer_use": { + "type": "boolean" + }, "connectors": { "type": "boolean" }, @@ -2532,6 +2535,9 @@ "collaboration_modes": { "type": "boolean" }, + "computer_use": { + "type": "boolean" + }, "connectors": { "type": "boolean" }, diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index b9eb71a8e..527cef36f 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -164,6 +164,10 @@ pub enum Feature { /// /// Requirements-only gate: this should be set from requirements, not user config. BrowserUse, + /// Allow Codex Computer Use. + /// + /// Requirements-only gate: this should be set from requirements, not user config. + ComputerUse, /// Temporary internal-only flag for PS-backed remote plugin catalog development. RemotePlugin, /// Show the startup prompt for migrating external agent config into Codex. @@ -868,6 +872,12 @@ pub const FEATURES: &[FeatureSpec] = &[ stage: Stage::Stable, default_enabled: true, }, + FeatureSpec { + id: Feature::ComputerUse, + key: "computer_use", + stage: Stage::Stable, + default_enabled: true, + }, FeatureSpec { id: Feature::RemotePlugin, key: "remote_plugin", diff --git a/codex-rs/features/src/tests.rs b/codex-rs/features/src/tests.rs index f5704dd71..08c16590a 100644 --- a/codex-rs/features/src/tests.rs +++ b/codex-rs/features/src/tests.rs @@ -153,6 +153,10 @@ fn browser_controls_are_stable_and_enabled_by_default() { assert_eq!(Feature::BrowserUse.stage(), Stage::Stable); assert_eq!(Feature::BrowserUse.default_enabled(), true); assert_eq!(feature_for_key("browser_use"), Some(Feature::BrowserUse)); + + assert_eq!(Feature::ComputerUse.stage(), Stage::Stable); + assert_eq!(Feature::ComputerUse.default_enabled(), true); + assert_eq!(feature_for_key("computer_use"), Some(Feature::ComputerUse)); } #[test]