diff --git a/codex-rs/config/src/config_toml.rs b/codex-rs/config/src/config_toml.rs index b627a83726..591b259676 100644 --- a/codex-rs/config/src/config_toml.rs +++ b/codex-rs/config/src/config_toml.rs @@ -443,7 +443,6 @@ pub struct ConfigToml { pub experimental_instructions_file: Option, pub experimental_compact_prompt_file: Option, pub experimental_use_unified_exec_tool: Option, - pub experimental_use_freeform_apply_patch: Option, /// Preferred OSS provider for local models, e.g. "lmstudio" or "ollama". pub oss_provider: Option, } diff --git a/codex-rs/config/src/profile_toml.rs b/codex-rs/config/src/profile_toml.rs index ed036d1b4e..e8e6320490 100644 --- a/codex-rs/config/src/profile_toml.rs +++ b/codex-rs/config/src/profile_toml.rs @@ -54,13 +54,11 @@ pub struct ConfigProfile { #[schemars(skip)] pub experimental_instructions_file: Option, pub experimental_compact_prompt_file: Option, - pub include_apply_patch_tool: Option, pub include_permissions_instructions: Option, pub include_apps_instructions: Option, pub include_collaboration_mode_instructions: Option, pub include_environment_context: Option, pub experimental_use_unified_exec_tool: Option, - pub experimental_use_freeform_apply_patch: Option, pub tools: Option, pub web_search: Option, pub analytics: Option, diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 560e87b058..d8c64a0d13 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -347,9 +347,6 @@ "experimental_compact_prompt_file": { "$ref": "#/definitions/AbsolutePathBuf" }, - "experimental_use_freeform_apply_patch": { - "type": "boolean" - }, "experimental_use_unified_exec_tool": { "type": "boolean" }, @@ -430,9 +427,6 @@ "exec_permission_approvals": { "type": "boolean" }, - "experimental_use_freeform_apply_patch": { - "type": "boolean" - }, "experimental_use_unified_exec_tool": { "type": "boolean" }, @@ -619,9 +613,6 @@ }, "type": "object" }, - "include_apply_patch_tool": { - "type": "boolean" - }, "include_apps_instructions": { "type": "boolean" }, @@ -4090,9 +4081,6 @@ ], "description": "Experimental / do not use. Selects the thread store implementation." }, - "experimental_use_freeform_apply_patch": { - "type": "boolean" - }, "experimental_use_unified_exec_tool": { "type": "boolean" }, @@ -4173,9 +4161,6 @@ "exec_permission_approvals": { "type": "boolean" }, - "experimental_use_freeform_apply_patch": { - "type": "boolean" - }, "experimental_use_unified_exec_tool": { "type": "boolean" }, diff --git a/codex-rs/core/src/config/config_tests.rs b/codex-rs/core/src/config/config_tests.rs index 5f060414ed..e0be0bda68 100644 --- a/codex-rs/core/src/config/config_tests.rs +++ b/codex-rs/core/src/config/config_tests.rs @@ -4237,7 +4237,6 @@ async fn legacy_toggles_map_to_features() -> std::io::Result<()> { let codex_home = TempDir::new()?; let cfg = ConfigToml { experimental_use_unified_exec_tool: Some(true), - experimental_use_freeform_apply_patch: Some(true), ..Default::default() }; @@ -4248,11 +4247,8 @@ async fn legacy_toggles_map_to_features() -> std::io::Result<()> { ) .await?; - assert!(config.features.enabled(Feature::ApplyPatchFreeform)); assert!(config.features.enabled(Feature::UnifiedExec)); - assert!(config.include_apply_patch_tool); - assert!(config.use_experimental_unified_exec_tool); Ok(()) diff --git a/codex-rs/core/src/config/managed_features.rs b/codex-rs/core/src/config/managed_features.rs index a575b0a45b..78b88d2f3a 100644 --- a/codex-rs/core/src/config/managed_features.rs +++ b/codex-rs/core/src/config/managed_features.rs @@ -269,13 +269,6 @@ fn explicit_feature_settings_in_config(cfg: &ConfigToml) -> Vec<(String, Feature enabled, )); } - if let Some(enabled) = cfg.experimental_use_freeform_apply_patch { - explicit_settings.push(( - "experimental_use_freeform_apply_patch".to_string(), - Feature::ApplyPatchFreeform, - enabled, - )); - } for (profile_name, profile) in &cfg.profiles { if let Some(features) = profile.features.as_ref() { for (key, enabled) in features.entries() { @@ -288,13 +281,6 @@ fn explicit_feature_settings_in_config(cfg: &ConfigToml) -> Vec<(String, Feature } } } - if let Some(enabled) = profile.include_apply_patch_tool { - explicit_settings.push(( - format!("profiles.{profile_name}.include_apply_patch_tool"), - Feature::ApplyPatchFreeform, - enabled, - )); - } if let Some(enabled) = profile.experimental_use_unified_exec_tool { explicit_settings.push(( format!("profiles.{profile_name}.experimental_use_unified_exec_tool"), @@ -302,13 +288,6 @@ fn explicit_feature_settings_in_config(cfg: &ConfigToml) -> Vec<(String, Feature enabled, )); } - if let Some(enabled) = profile.experimental_use_freeform_apply_patch { - explicit_settings.push(( - format!("profiles.{profile_name}.experimental_use_freeform_apply_patch"), - Feature::ApplyPatchFreeform, - enabled, - )); - } } explicit_settings @@ -370,14 +349,11 @@ pub(crate) fn validate_feature_requirements_in_config_toml( FeatureConfigSource { features: cfg.features.as_ref(), include_apply_patch_tool: None, - experimental_use_freeform_apply_patch: cfg.experimental_use_freeform_apply_patch, experimental_use_unified_exec_tool: cfg.experimental_use_unified_exec_tool, }, FeatureConfigSource { features: profile.features.as_ref(), - include_apply_patch_tool: profile.include_apply_patch_tool, - experimental_use_freeform_apply_patch: profile - .experimental_use_freeform_apply_patch, + include_apply_patch_tool: None, experimental_use_unified_exec_tool: profile.experimental_use_unified_exec_tool, }, FeatureOverrides::default(), diff --git a/codex-rs/core/src/config/mod.rs b/codex-rs/core/src/config/mod.rs index 3c50880590..2046d50a9d 100644 --- a/codex-rs/core/src/config/mod.rs +++ b/codex-rs/core/src/config/mod.rs @@ -1881,7 +1881,6 @@ pub struct ConfigOverrides { pub developer_instructions: Option, pub personality: Option, pub compact_prompt: Option, - pub include_apply_patch_tool: Option, pub show_raw_agent_reasoning: Option, pub tools_web_search_request: Option, pub ephemeral: Option, @@ -2196,7 +2195,6 @@ impl Config { developer_instructions, personality, compact_prompt, - include_apply_patch_tool: include_apply_patch_tool_override, show_raw_agent_reasoning, tools_web_search_request: override_tools_web_search_request, ephemeral, @@ -2250,7 +2248,6 @@ impl Config { }; let tool_suggest = resolve_tool_suggest_config(&cfg, &config_layer_stack); let feature_overrides = FeatureOverrides { - include_apply_patch_tool: include_apply_patch_tool_override, web_search_request: override_tools_web_search_request, }; @@ -2258,14 +2255,11 @@ impl Config { FeatureConfigSource { features: cfg.features.as_ref(), include_apply_patch_tool: None, - experimental_use_freeform_apply_patch: cfg.experimental_use_freeform_apply_patch, experimental_use_unified_exec_tool: cfg.experimental_use_unified_exec_tool, }, FeatureConfigSource { features: config_profile.features.as_ref(), - include_apply_patch_tool: config_profile.include_apply_patch_tool, - experimental_use_freeform_apply_patch: config_profile - .experimental_use_freeform_apply_patch, + include_apply_patch_tool: None, experimental_use_unified_exec_tool: config_profile .experimental_use_unified_exec_tool, }, diff --git a/codex-rs/core/src/session/config_lock.rs b/codex-rs/core/src/session/config_lock.rs index 99137f4db0..1e632ba0cf 100644 --- a/codex-rs/core/src/session/config_lock.rs +++ b/codex-rs/core/src/session/config_lock.rs @@ -194,7 +194,6 @@ fn drop_lockfile_inputs(lock_config: &mut ConfigToml) { lock_config.default_permissions = None; lock_config.permissions = None; lock_config.experimental_use_unified_exec_tool = None; - lock_config.experimental_use_freeform_apply_patch = None; } fn resolved_config_to_toml( diff --git a/codex-rs/exec/src/lib.rs b/codex-rs/exec/src/lib.rs index 7825d163c9..23f87685c6 100644 --- a/codex-rs/exec/src/lib.rs +++ b/codex-rs/exec/src/lib.rs @@ -423,7 +423,6 @@ pub async fn run_main(cli: Cli, arg0_paths: Arg0DispatchPaths) -> anyhow::Result developer_instructions: None, personality: None, compact_prompt: None, - include_apply_patch_tool: None, show_raw_agent_reasoning: oss.then_some(true), tools_web_search_request: None, ephemeral: ephemeral.then_some(true), diff --git a/codex-rs/features/src/legacy.rs b/codex-rs/features/src/legacy.rs index e87f14f590..c3dcb089a5 100644 --- a/codex-rs/features/src/legacy.rs +++ b/codex-rs/features/src/legacy.rs @@ -21,10 +21,6 @@ const ALIASES: &[Alias] = &[ legacy_key: "experimental_use_unified_exec_tool", feature: Feature::UnifiedExec, }, - Alias { - legacy_key: "experimental_use_freeform_apply_patch", - feature: Feature::ApplyPatchFreeform, - }, Alias { legacy_key: "include_apply_patch_tool", feature: Feature::ApplyPatchFreeform, @@ -72,7 +68,6 @@ pub(crate) fn feature_for_key(key: &str) -> Option { #[derive(Debug, Default)] pub(crate) struct LegacyFeatureToggles { pub include_apply_patch_tool: Option, - pub experimental_use_freeform_apply_patch: Option, pub experimental_use_unified_exec_tool: Option, } @@ -84,12 +79,6 @@ impl LegacyFeatureToggles { self.include_apply_patch_tool, "include_apply_patch_tool", ); - set_if_some( - features, - Feature::ApplyPatchFreeform, - self.experimental_use_freeform_apply_patch, - "experimental_use_freeform_apply_patch", - ); set_if_some( features, Feature::UnifiedExec, diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index d8a0a598e7..6756ce7af0 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -286,7 +286,6 @@ pub struct Features { #[derive(Debug, Clone, Default)] pub struct FeatureOverrides { - pub include_apply_patch_tool: Option, pub web_search_request: Option, } @@ -294,17 +293,11 @@ pub struct FeatureOverrides { pub struct FeatureConfigSource<'a> { pub features: Option<&'a FeaturesToml>, pub include_apply_patch_tool: Option, - pub experimental_use_freeform_apply_patch: Option, pub experimental_use_unified_exec_tool: Option, } impl FeatureOverrides { fn apply(self, features: &mut Features) { - LegacyFeatureToggles { - include_apply_patch_tool: self.include_apply_patch_tool, - ..Default::default() - } - .apply(features); if let Some(enabled) = self.web_search_request { if enabled { features.enable(Feature::WebSearchRequest); @@ -470,7 +463,6 @@ impl Features { for source in [base, profile] { LegacyFeatureToggles { include_apply_patch_tool: source.include_apply_patch_tool, - experimental_use_freeform_apply_patch: source.experimental_use_freeform_apply_patch, experimental_use_unified_exec_tool: source.experimental_use_unified_exec_tool, } .apply(&mut features); diff --git a/codex-rs/features/src/tests.rs b/codex-rs/features/src/tests.rs index e7aab9cec9..567baed2c2 100644 --- a/codex-rs/features/src/tests.rs +++ b/codex-rs/features/src/tests.rs @@ -393,7 +393,6 @@ fn from_sources_applies_base_profile_and_overrides() { }, FeatureOverrides { web_search_request: Some(false), - ..Default::default() }, );