From ce0e28ea6fa6415b9e580bd8db0c6a35382632fb Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 19 Apr 2026 13:48:15 -0700 Subject: [PATCH] Avoid redundant memory enable notice (#18580) ## Summary Fixes #18554. The `/experimental` menu can submit the full experimental feature state even when the user presses Enter without toggling anything. Previously, Codex showed `Memories will be enabled in the next session.` whenever the submitted updates included `Feature::MemoryTool = true`, so sessions where Memories were already enabled could show a redundant warning on a no-op save. This change records whether `Feature::MemoryTool` was enabled before applying feature updates and only emits the next-session notice when Memories actually transitions from disabled to enabled. --- codex-rs/tui/src/app.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 0413a25d3..2bcdd87c8 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -1423,10 +1423,12 @@ impl App { return; } + let memory_tool_was_enabled = self.config.features.enabled(Feature::MemoryTool); self.config = next_config; - let show_memory_enable_notice = feature_updates_to_apply - .iter() - .any(|(feature, enabled)| *feature == Feature::MemoryTool && *enabled); + let show_memory_enable_notice = + feature_updates_to_apply.iter().any(|(feature, enabled)| { + *feature == Feature::MemoryTool && *enabled && !memory_tool_was_enabled + }); for (feature, effective_enabled) in feature_updates_to_apply { self.chat_widget .set_feature_enabled(feature, effective_enabled);