diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index e085ed01f0..8a9addaefd 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -4944,6 +4944,25 @@ pub(crate) async fn run_turn( // enabled plugins, then converted into turn-scoped guidance below. let mentioned_plugins = collect_explicit_plugin_mentions(&input, loaded_plugins.capability_summaries()); + info!( + plugin_input_texts = ?input + .iter() + .filter_map(|item| match item { + UserInput::Text { text, .. } => Some(text.as_str()), + _ => None, + }) + .collect::>(), + available_plugins = ?loaded_plugins + .capability_summaries() + .iter() + .map(|plugin| plugin.display_name.as_str()) + .collect::>(), + mentioned_plugins = ?mentioned_plugins + .iter() + .map(|plugin| plugin.display_name.as_str()) + .collect::>(), + "resolved explicit plugin mentions for turn" + ); let mcp_tools = if turn_context.config.features.enabled(Feature::Apps) || !mentioned_plugins.is_empty() { // Plugin mentions need raw MCP/app inventory even when app tools diff --git a/codex-rs/core/src/plugins/manager.rs b/codex-rs/core/src/plugins/manager.rs index b4c72d4d91..845dfff550 100644 --- a/codex-rs/core/src/plugins/manager.rs +++ b/codex-rs/core/src/plugins/manager.rs @@ -30,6 +30,7 @@ use std::fs; use std::path::Path; use std::path::PathBuf; use std::sync::RwLock; +use tracing::info; use tracing::warn; const DEFAULT_SKILLS_DIR_NAME: &str = "skills"; @@ -258,6 +259,7 @@ impl PluginsManager { force_reload: bool, ) -> 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(), @@ -267,11 +269,29 @@ impl PluginsManager { } if !force_reload && let Some(outcome) = self.cached_outcome_for_cwd(cwd) { + info!( + cwd = ?cwd, + plugin_display_names = ?outcome + .capability_summaries() + .iter() + .map(|plugin| plugin.display_name.as_str()) + .collect::>(), + "plugins cache hit" + ); return outcome; } let outcome = load_plugins_from_layer_stack(config_layer_stack, &self.store); log_plugin_load_errors(&outcome); + info!( + cwd = ?cwd, + plugin_display_names = ?outcome + .capability_summaries() + .iter() + .map(|plugin| plugin.display_name.as_str()) + .collect::>(), + "plugins loaded from config layer stack" + ); let mut cache = match self.cache_by_cwd.write() { Ok(cache) => cache, Err(err) => err.into_inner(),