Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

app-server: allow remote_control runtime feature override (#20047)

Ruslan Nigmatullin1de7a9bf6935
diff --git a/codex-rs/app-server/README.md b/codex-rs/app-server/README.md
index 2f968789e4..248f5d4158 100644
--- a/codex-rs/app-server/README.md
+++ b/codex-rs/app-server/README.md
@@ -192,7 +192,7 @@ Example with notification opt-out:
- `fs/changed` — notification emitted when watched paths change, including the `watchId` and `changedPaths`.
- `model/list` — list available models (set `includeHidden: true` to include entries with `hidden: true`), with reasoning effort options, `additionalSpeedTiers`, optional legacy `upgrade` model ids, optional `upgradeInfo` metadata (`model`, `upgradeCopy`, `modelLink`, `migrationMarkdown`), and optional `availabilityNux` metadata.
- `experimentalFeature/list` — list feature flags with stage metadata (`beta`, `underDevelopment`, `stable`, etc.), enabled/default-enabled state, and cursor pagination. For non-beta flags, `displayName`/`description`/`announcement` are `null`.
-- `experimentalFeature/enablement/set` — patch the in-memory process-wide runtime feature enablement for the currently supported feature keys (`apps`, `plugins`). For each feature, precedence is: cloud requirements > --enable <feature_name> > config.toml > experimentalFeature/enablement/set (new) > code default.
+- `experimentalFeature/enablement/set` — patch the in-memory process-wide runtime feature enablement for the currently supported feature keys (`apps`, `memories`, `plugins`, `remote_control`, `tool_search`, `tool_suggest`, `tool_call_mcp_elicitation`). For each feature, precedence is: cloud requirements > --enable <feature_name> > config.toml > experimentalFeature/enablement/set (new) > code default.
- `collaborationMode/list` — list available collaboration mode presets (experimental, no pagination). This response omits built-in developer instructions; clients should either pass `settings.developer_instructions: null` when setting a mode to use Codex's built-in instructions, or provide their own instructions explicitly.
- `skills/list` — list skills for one or more `cwd` values (optional `forceReload`).
- `marketplace/add` — add a remote plugin marketplace from an HTTP(S) Git URL, SSH Git URL, or GitHub `owner/repo` shorthand, then persist it into the user marketplace config. Returns the installed root path plus whether the marketplace was already present.
diff --git a/codex-rs/app-server/src/config_api.rs b/codex-rs/app-server/src/config_api.rs
index e8bb82777c..ac7c1510c8 100644
--- a/codex-rs/app-server/src/config_api.rs
+++ b/codex-rs/app-server/src/config_api.rs
@@ -48,6 +48,7 @@ const SUPPORTED_EXPERIMENTAL_FEATURE_ENABLEMENT: &[&str] = &[
"apps",
"memories",
"plugins",
+ "remote_control",
"tool_search",
"tool_suggest",
"tool_call_mcp_elicitation",
diff --git a/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs b/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
index 57520a2d6c..54b1f319e9 100644
--- a/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
+++ b/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
@@ -306,6 +306,24 @@ async fn experimental_feature_enablement_set_only_updates_named_features() -> Re
Ok(())
}
+#[tokio::test]
+async fn experimental_feature_enablement_set_allows_remote_control() -> Result<()> {
+ let codex_home = TempDir::new()?;
+ let mut mcp = McpProcess::new(codex_home.path()).await?;
+ timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
+ let remote_control_enabled = false;
+ let enablement = BTreeMap::from([("remote_control".to_string(), remote_control_enabled)]);
+
+ let actual = set_experimental_feature_enablement(&mut mcp, enablement.clone()).await?;
+
+ assert_eq!(
+ actual,
+ ExperimentalFeatureEnablementSetResponse { enablement }
+ );
+
+ Ok(())
+}
+
#[tokio::test]
async fn experimental_feature_enablement_set_empty_map_is_no_op() -> Result<()> {
let codex_home = TempDir::new()?;
@@ -363,7 +381,7 @@ async fn experimental_feature_enablement_set_rejects_non_allowlisted_feature() -
);
assert!(
error.message.contains(
- "apps, memories, plugins, tool_search, tool_suggest, tool_call_mcp_elicitation"
+ "apps, memories, plugins, remote_control, tool_search, tool_suggest, tool_call_mcp_elicitation"
),
"{}",
error.message