mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Centralize thread MCP connections in McpRuntime (#33889)
## What changed - Add a thread-owned `McpRuntime` that atomically publishes connection-set replacements and owns shutdown. - Route `McpResourceClient` snapshots and cache keys through that runtime so extension clients observe refreshed MCP servers. - Keep model-step configuration snapshots separate from ownership of live MCP connections. ## Testing - Add coverage that captures an extension's session resource client, refreshes the MCP server configuration, and verifies that the existing client sees the newly published server. GitOrigin-RevId: 351b2e25594b8eb6b91e50ff8d06b7d49768ae1c
This commit is contained in:
1 parent
b99cc315fd
commit
f24e695470
10 files changed
+203
-67
No files matched your search
@@ -607,11 +607,7 @@ async fn shutdown_session_runtime(sess: &Arc<Session>) {
|
||||
if let Err(err) = sess.services.code_mode_service.shutdown().await {
|
||||
warn!("failed to shutdown code mode session: {err}");
|
||||
}
|
||||
sess.services
|
||||
.latest_mcp_runtime()
|
||||
.manager_arc()
|
||||
.shutdown()
|
||||
.await;
|
||||
sess.services.mcp_runtime.shutdown().await;
|
||||
sess.guardian_review_session.shutdown().await;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user