mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Preserve app invocation context across MCP tool refreshes (#59991)
## What changed Keep the advertised `_codex_apps.invocation_context` when an app's tool metadata refreshes on the same server connection, while using refreshed values for other metadata. If the invocation context changes on a different connection, skip the call as unavailable. ## Testing Extend the code-mode compaction test to refresh app tools before resuming a cell and verify that calls retain the original invocation context while picking up the refreshed `resource_uri`. GitOrigin-RevId: 1b6072faed74623994ea82035a6ed977451984a4
This commit is contained in:
@@ -284,6 +284,12 @@ impl PreparedMcpCall {
|
||||
self.tool_info.get()
|
||||
}
|
||||
|
||||
/// Whether the server connection that issued the step's tools still owns this call.
|
||||
pub fn uses_connection_from(&self, binding: &McpBinding) -> bool {
|
||||
self.connections
|
||||
.shares_server_connection(&binding.connections, &self.server_name)
|
||||
}
|
||||
|
||||
/// Returns the configuration and approval authority captured with this client.
|
||||
pub fn config(&self) -> &McpConfig {
|
||||
&self.config
|
||||
|
||||
Reference in New Issue
Block a user