From 89cfc2b2a4316290ecd719c08edf69c9d7b5aefd Mon Sep 17 00:00:00 2001 From: mixelpixx Date: Fri, 2 Oct 2026 06:29:26 -0400 Subject: [PATCH] fix: status bar says "agents active", not "agents connected" The count is MCP clients that made a request in the last 5 minutes. Each Claude session with Arduino Agent configured runs its own bridge, which fetches the tool list as soon as the IDE starts, so two open sessions showed "2 agents connected" before anyone used a tool, and the item fell back to "MCP ready" after 5 idle minutes while both stayed attached. "Active" matches what is measured; the tooltip and dialog say how it is counted. Co-Authored-By: Claude Opus 5.5 --- arduino-mcp-extension/src/browser/connect-agent.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arduino-mcp-extension/src/browser/connect-agent.ts b/arduino-mcp-extension/src/browser/connect-agent.ts index 38fe900e1b7..fe8b7e8c241 100644 --- a/arduino-mcp-extension/src/browser/connect-agent.ts +++ b/arduino-mcp-extension/src/browser/connect-agent.ts @@ -105,8 +105,12 @@ export class ConnectAgentContribution tooltip = 'The MCP server is off (Preferences > MCP). Click for connection setup.'; } else if (status.activeClients > 0) { const n = status.activeClients; - text = n === 1 ? '$(hubot) Agent connected' : `$(hubot) ${n} agents connected`; - tooltip = `${n} MCP session${n === 1 ? '' : 's'} active in the last 5 minutes on ${url}. Click for connection setup.`; + // "Active", not "connected": this counts clients that made a request in the + // last 5 minutes (each Claude session's bridge counts once it fetches tools). + text = n === 1 ? '$(hubot) Agent active' : `$(hubot) ${n} agents active`; + tooltip = + `${n} MCP client${n === 1 ? '' : 's'} used Arduino Agent in the last 5 minutes ` + + `(each AI session with Arduino Agent configured counts once) on ${url}. Click for connection setup.`; } else { text = '$(hubot) MCP ready'; tooltip = `MCP server listening on ${url}. Click to connect an AI agent.`; @@ -171,7 +175,9 @@ class ConnectAgentDialog extends AbstractDialog { document.createTextNode( status.running ? `MCP server running on ${url}` + - (status.activeClients ? ` - ${status.activeClients} active session(s)` : '') + (status.activeClients + ? ` - ${status.activeClients} client${status.activeClients === 1 ? '' : 's'} active in the last 5 minutes` + : '') : status.error ?? 'The MCP server is off. Turn it on in Preferences > MCP, then come back here.' )