From e188ff992bc806a05fdff11792d8fc7e6b62989c Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Fri, 3 Apr 2026 17:47:33 -0400 Subject: [PATCH] fix: tighten isClientRejection heuristic Narrow 'client_id' match to 'client_id mismatch' to avoid false-positive cleanup on unrelated errors that happen to mention client_id. --- packages/api/src/mcp/MCPConnectionFactory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/mcp/MCPConnectionFactory.ts b/packages/api/src/mcp/MCPConnectionFactory.ts index 49ca3a6b96..26d83e5330 100644 --- a/packages/api/src/mcp/MCPConnectionFactory.ts +++ b/packages/api/src/mcp/MCPConnectionFactory.ts @@ -507,7 +507,7 @@ export class MCPConnectionFactory { return ( msg.includes('invalid_client') || msg.includes('unauthorized_client') || - msg.includes('client_id') || + msg.includes('client_id mismatch') || msg.includes('client not found') || msg.includes('unknown client') );