mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Support Apps tool catalogs without shared snapshots (#57572)
## What changed - Add `ConnectorRuntimeManager::without_shared_snapshot()` to keep connector catalogs local to each client and disable disk caching. - Use the thread's own Apps discovery when snapshot sharing is disabled, preserving its catalog across turns. - Expose `apps_tools_from_mcp_client()` to read a ready, unshared Apps client's tools without starting or waiting for discovery. ## Testing Extend coverage for shared-cache eligibility and verify that an unshared thread waits for its own Apps discovery and uses its own tools on successive model requests, even when a peer finishes discovery first. GitOrigin-RevId: d57ddacaede047e67c09d378c86c1aa3577ca56f
This commit is contained in:
@@ -294,6 +294,17 @@ impl CodexThread {
|
||||
&self.session.services.thread_extension_data
|
||||
}
|
||||
|
||||
/// Returns tools from this thread’s ready, unshared Apps MCP client.
|
||||
/// Returns an empty list if the client is absent, still starting, or uses
|
||||
/// a shared catalog. Does not start or wait for discovery.
|
||||
pub async fn apps_tools_from_mcp_client(&self) -> Vec<codex_mcp::ToolInfo> {
|
||||
self.session
|
||||
.services
|
||||
.mcp_runtime
|
||||
.apps_tools_from_mcp_client()
|
||||
.await
|
||||
}
|
||||
|
||||
/// Returns data captured by the named running turn, not newer thread settings.
|
||||
pub async fn current_turn_extension_data<T>(&self, expected_turn_id: &str) -> Option<Arc<T>>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user