mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
Sub-agent McpConnectionManager startup events leaked into the leader TUI's status header because McpServerStatusUpdated notifications carried no thread identity and were routed Global, which fell through to the leader's chat_widget and overwrote its mcp_startup_status map. Once a sub-agent re-emitted Starting for a server the leader already had as Ready, the leader's spinner reopened and the settle check could never pass. Add an optional thread_id to McpServerStatusUpdatedNotification, set it from the emitting session in apply_bespoke_event_handling, and route notifications carrying a thread_id through ServerNotificationThreadTarget so non-leader threads enqueue to their own buffered store rather than mutating the leader's map. A missing thread_id keeps the existing Global behaviour for backward compatibility with older app servers. Adds: - routing unit tests covering both presence and absence of thread_id - an app-level test asserting a sub-agent McpServerStatusUpdated does not flip the leader's task-running state - thread_id assertion in the existing app-server integration test Closes #18068 Refs #16821, #19542 Co-authored-by: Codex <noreply@openai.com>
42 lines
940 B
JSON
Generated
42 lines
940 B
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"McpServerStartupState": {
|
|
"enum": [
|
|
"starting",
|
|
"ready",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"properties": {
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/McpServerStartupState"
|
|
},
|
|
"threadId": {
|
|
"default": null,
|
|
"description": "Identifier of the thread whose `McpConnectionManager` produced this update. Always set on notifications emitted by current servers; remains `Option` so legacy clients that omit the field still deserialise and route as a global event.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"status"
|
|
],
|
|
"title": "McpServerStatusUpdatedNotification",
|
|
"type": "object"
|
|
} |