[codex-core] Reuse turn MCP snapshot for injections

This commit is contained in:
malsamiri
2026-07-09 08:32:45 -07:00
parent b246dc1b3a
commit 27f0235f89
+2 -8
View File
@@ -550,14 +550,8 @@ async fn build_skills_and_plugins(
// Plugin mentions need raw MCP/app inventory even when app tools
// are normally hidden so we can describe the plugin's currently
// usable capabilities for this turn.
match step_context
.mcp
.manager_arc()
.list_all_tools_for_turn()
.or_cancel(cancellation_token)
.await
{
Ok(mcp_tools) => mcp_tools,
match step_context.mcp_tools().or_cancel(cancellation_token).await {
Ok(mcp_tools) => mcp_tools.to_vec(),
Err(_) if turn_context.apps_enabled() => return None,
Err(_) => Vec::new(),
}