From 464d4da7f6e97af87ffa5f4ebf92767db7258046 Mon Sep 17 00:00:00 2001 From: Sayan Sisodiya Date: Thu, 5 Mar 2026 15:19:06 -0800 Subject: [PATCH] Avoid caching empty plugin outcomes when plugins feature is disabled Co-authored-by: Codex --- codex-rs/core/src/plugins/manager.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/codex-rs/core/src/plugins/manager.rs b/codex-rs/core/src/plugins/manager.rs index 845dfff550..ac0b225d0c 100644 --- a/codex-rs/core/src/plugins/manager.rs +++ b/codex-rs/core/src/plugins/manager.rs @@ -260,11 +260,6 @@ impl PluginsManager { ) -> PluginLoadOutcome { if !plugins_feature_enabled_from_stack(config_layer_stack) { info!(cwd = ?cwd, "plugins disabled in config layer stack"); - let mut cache = match self.cache_by_cwd.write() { - Ok(cache) => cache, - Err(err) => err.into_inner(), - }; - cache.insert(cwd.to_path_buf(), PluginLoadOutcome::default()); return PluginLoadOutcome::default(); }