mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Use thread connections for enterprise MCP status listings (#55394)
## Why Enterprise-managed MCP authentication requires the thread's admitted connection. Bulk `mcpServerStatus/list` requests need to use that connection to report the enterprise server's catalog consistently with single-server requests. ## What changed - Read enterprise server metadata from the thread runtime when listing all MCP servers, preserving ordinary server discovery. - Check the expected server registration before discovery so edited or disabled registrations cannot reuse an old connection's catalog. ## Testing Add coverage for bulk and single-server status consistency, catalog metadata, and registration changes. Extend enterprise authentication lifecycle tests to cover bearer renewal, grant replacement, and logout during a pending exchange. Add a scenario asserting that enterprise sign-in failure preserves ordinary MCP tool schemas, calls, and model history. GitOrigin-RevId: 3bf3bd672511d0c753cd95ec777892f72bd6eb89
This commit is contained in:
@@ -1152,6 +1152,7 @@ impl CodexThread {
|
||||
&self,
|
||||
server: &str,
|
||||
detail: codex_mcp::McpSnapshotDetail,
|
||||
expected_registration: Option<&codex_mcp::ResolvedMcpServer>,
|
||||
) -> anyhow::Result<(
|
||||
Arc<codex_mcp::McpConfig>,
|
||||
codex_mcp::McpServerStatusSnapshot,
|
||||
@@ -1161,7 +1162,7 @@ impl CodexThread {
|
||||
self.session
|
||||
.services
|
||||
.mcp_runtime
|
||||
.server_status_snapshot(server, detail, &runtime_context)
|
||||
.server_status_snapshot(server, detail, expected_registration, &runtime_context)
|
||||
.await
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user