What is the bug?
Agent execution with MCP tools hangs indefinitely on latest code base.
This is working if we remove MCP connector from agent creation command.
Also it is working fine with OpenSearch 3.6(last released version)
Agent execution log with MCP connector:
Log with MCP:
[2026-05-06T20:29:08,345][INFO ][o.o.m.m.i.ConversationMetaIndex] [integTest-0] Successfully created the memory with id : PgbM_Z0BRhW8BFy3w6Gr
[2026-05-06T20:29:08,383][INFO ][o.o.m.m.a.c.CreateInteractionTransportAction] [integTest-0] Updating the memory PgbM_Z0BRhW8BFy3w6Gr after the message PwbM_Z0BRhW8BFy3w6HU is created
[2026-05-06T20:29:08,383][INFO ][o.o.m.m.i.InteractionsIndex] [integTest-0] Successfully created the message with id : PwbM_Z0BRhW8BFy3w6HU
[2026-05-06T20:29:08,416][INFO ][o.o.m.e.a.a.MLAgentExecutor] [integTest-0] Created parent interaction ID: PwbM_Z0BRhW8BFy3w6HU
[2026-05-06T20:29:11,125][INFO ][o.o.m.e.i.MLIndicesHandler] [integTest-0] Using initIndexWithoutThreadContext method to create index: .plugins-ml-model
[2026-05-06T20:29:11,125][INFO ][o.o.r.m.c.i.LocalClusterIndicesClient] [integTest-0] Searching [.plugins-ml-model] (edited)
Agent execution log without MCP connector:
[2026-05-06T20:28:19,310][INFO ][o.o.m.m.i.ConversationMetaIndex] [integTest-0] Successfully created the memory with id : OQbM_Z0BRhW8BFy3BKEd
[2026-05-06T20:28:19,351][INFO ][o.o.m.m.a.c.CreateInteractionTransportAction] [integTest-0] Updating the memory OQbM_Z0BRhW8BFy3BKEd after the message OgbM_Z0BRhW8BFy3BKFL is created
[2026-05-06T20:28:19,351][INFO ][o.o.m.m.i.InteractionsIndex] [integTest-0] Successfully created the message with id : OgbM_Z0BRhW8BFy3BKFL
[2026-05-06T20:28:19,388][INFO ][o.o.m.e.a.a.MLAgentExecutor] [integTest-0] Created parent interaction ID: OgbM_Z0BRhW8BFy3BKFL
[2026-05-06T20:28:19,390][INFO ][o.o.m.e.a.a.MLChatAgentRunner] [integTest-0] Starting chat agent execution. agentId=NQbK_Z0BRhW8BFy3vKE1, tenantId=null
[2026-05-06T20:28:21,103][INFO ][o.o.m.e.i.MLIndicesHandler] [integTest-0] Using initIndexWithoutThreadContext method to create index: .plugins-ml-model
[2026-05-06T20:28:21,104][INFO ][o.o.r.m.c.i.LocalClusterIndicesClient] [integTest-0] Searching [.plugins-ml-model]
[2026-05-06T20:28:21,109][INFO ][o.o.r.m.c.i.LocalClusterIndicesClient] [integTest-0] Search returned 1 hits hits
[2026-05-06T20:28:21,524][INFO ][o.o.m.m.a.c.CreateInteractionTransportAction] [integTest-0] Updating the memory OQbM_Z0BRhW8BFy3BKEd after the message OwbM_Z0BRhW8BFy3DKHC is created
[2026-05-06T20:28:21,528][INFO ][o.o.m.m.i.InteractionsIndex] [integTest-0] Successfully created the message with id : OwbM_Z0BRhW8BFy3DKHC
[2026-05-06T20:28:21,637][INFO ][o.o.m.m.a.c.UpdateInteractionTransportAction] [integTest-0] Successfully updated the Message with ID: OgbM_Z0BRhW8BFy3BKFL
[2026-05-06T20:28:21,637][INFO ][o.o.m.e.a.a.AgentUtils ] [integTest-0] {"tenantId":null,"model_usage":{"model_name":"My OpenAI model: gpt-5 Test1","model_url":"removed-url-from-here","call_count":1,"total_tokens":666,"output_tokens":18,"model_id":"KgbG_Z0BRhW8BFy3GKEn","reasoning_tokens":0,"input_tokens":648,"cache_read_input_tokens":0},"eventTime":1778079501637}
[2026-05-06T20:28:21,640][INFO ][o.o.m.e.a.a.MLAgentExecutor] [integTest-0] Agent execution completed successfully. agentType=conversational, agentId=NQbK_Z0BRhW8BFy3vKE1, tenantId=null, latencyMs=2252
How can one reproduce the bug?
- Create MCP connector
- Register a model
- Create a Conversational agent with above created MCP connector and model.
- Execute above created agent. - This will be in indefinite hung stage.
What is the expected behavior?
Execute the agent and give result to agent query
What is your host/environment?
- OS: MacOSx
- Version OpenSearch 3.7
- Plugins - MLCommons plugin
What is the bug?
Agent execution with MCP tools hangs indefinitely on latest code base.
This is working if we remove MCP connector from agent creation command.
Also it is working fine with OpenSearch 3.6(last released version)
Agent execution log with MCP connector:
Log with MCP:
[2026-05-06T20:29:08,345][INFO ][o.o.m.m.i.ConversationMetaIndex] [integTest-0] Successfully created the memory with id : PgbM_Z0BRhW8BFy3w6Gr
[2026-05-06T20:29:08,383][INFO ][o.o.m.m.a.c.CreateInteractionTransportAction] [integTest-0] Updating the memory PgbM_Z0BRhW8BFy3w6Gr after the message PwbM_Z0BRhW8BFy3w6HU is created
[2026-05-06T20:29:08,383][INFO ][o.o.m.m.i.InteractionsIndex] [integTest-0] Successfully created the message with id : PwbM_Z0BRhW8BFy3w6HU
[2026-05-06T20:29:08,416][INFO ][o.o.m.e.a.a.MLAgentExecutor] [integTest-0] Created parent interaction ID: PwbM_Z0BRhW8BFy3w6HU
[2026-05-06T20:29:11,125][INFO ][o.o.m.e.i.MLIndicesHandler] [integTest-0] Using initIndexWithoutThreadContext method to create index: .plugins-ml-model
[2026-05-06T20:29:11,125][INFO ][o.o.r.m.c.i.LocalClusterIndicesClient] [integTest-0] Searching [.plugins-ml-model] (edited)
Agent execution log without MCP connector:
[2026-05-06T20:28:19,310][INFO ][o.o.m.m.i.ConversationMetaIndex] [integTest-0] Successfully created the memory with id : OQbM_Z0BRhW8BFy3BKEd
[2026-05-06T20:28:19,351][INFO ][o.o.m.m.a.c.CreateInteractionTransportAction] [integTest-0] Updating the memory OQbM_Z0BRhW8BFy3BKEd after the message OgbM_Z0BRhW8BFy3BKFL is created
[2026-05-06T20:28:19,351][INFO ][o.o.m.m.i.InteractionsIndex] [integTest-0] Successfully created the message with id : OgbM_Z0BRhW8BFy3BKFL
[2026-05-06T20:28:19,388][INFO ][o.o.m.e.a.a.MLAgentExecutor] [integTest-0] Created parent interaction ID: OgbM_Z0BRhW8BFy3BKFL
[2026-05-06T20:28:19,390][INFO ][o.o.m.e.a.a.MLChatAgentRunner] [integTest-0] Starting chat agent execution. agentId=NQbK_Z0BRhW8BFy3vKE1, tenantId=null
[2026-05-06T20:28:21,103][INFO ][o.o.m.e.i.MLIndicesHandler] [integTest-0] Using initIndexWithoutThreadContext method to create index: .plugins-ml-model
[2026-05-06T20:28:21,104][INFO ][o.o.r.m.c.i.LocalClusterIndicesClient] [integTest-0] Searching [.plugins-ml-model]
[2026-05-06T20:28:21,109][INFO ][o.o.r.m.c.i.LocalClusterIndicesClient] [integTest-0] Search returned 1 hits hits
[2026-05-06T20:28:21,524][INFO ][o.o.m.m.a.c.CreateInteractionTransportAction] [integTest-0] Updating the memory OQbM_Z0BRhW8BFy3BKEd after the message OwbM_Z0BRhW8BFy3DKHC is created
[2026-05-06T20:28:21,528][INFO ][o.o.m.m.i.InteractionsIndex] [integTest-0] Successfully created the message with id : OwbM_Z0BRhW8BFy3DKHC
[2026-05-06T20:28:21,637][INFO ][o.o.m.m.a.c.UpdateInteractionTransportAction] [integTest-0] Successfully updated the Message with ID: OgbM_Z0BRhW8BFy3BKFL
[2026-05-06T20:28:21,637][INFO ][o.o.m.e.a.a.AgentUtils ] [integTest-0] {"tenantId":null,"model_usage":{"model_name":"My OpenAI model: gpt-5 Test1","model_url":"removed-url-from-here","call_count":1,"total_tokens":666,"output_tokens":18,"model_id":"KgbG_Z0BRhW8BFy3GKEn","reasoning_tokens":0,"input_tokens":648,"cache_read_input_tokens":0},"eventTime":1778079501637}
[2026-05-06T20:28:21,640][INFO ][o.o.m.e.a.a.MLAgentExecutor] [integTest-0] Agent execution completed successfully. agentType=conversational, agentId=NQbK_Z0BRhW8BFy3vKE1, tenantId=null, latencyMs=2252
How can one reproduce the bug?
What is the expected behavior?
Execute the agent and give result to agent query
What is your host/environment?