From 0cab8a7ece532764a1355f849326464137bdc236 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 22 Mar 2026 01:44:28 +0100 Subject: [PATCH] fix: stop subagent monitor windows from auto-opening on discovery Co-Authored-By: Claude Opus 4.6 --- src/web/public/panels-ui.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/web/public/panels-ui.js b/src/web/public/panels-ui.js index bd0fd0c6..c3dab11d 100644 --- a/src/web/public/panels-ui.js +++ b/src/web/public/panels-ui.js @@ -96,16 +96,8 @@ Object.assign(CodemanApp.prototype, { // Find which Codeman session owns this subagent (direct claudeSessionId match only) this.findParentSessionForSubagent(data.agentId); - // Auto-open window for new active agents — but ONLY if they belong to a Codeman session tab. - // Agents from external Claude sessions (not managed by Codeman) should not pop up. - if (data.status === 'active') { - const agentForCheck = this.subagents.get(data.agentId); - const hasMatchingTab = agentForCheck?.sessionId && - Array.from(this.sessions.values()).some(s => s.claudeSessionId === agentForCheck.sessionId); - if (hasMatchingTab) { - this.openSubagentWindow(data.agentId); - } - } + // Subagent windows are no longer auto-opened on discovery. + // Users can open them manually from the monitor panel or via openAllActiveSubagentWindows(). // Ensure connection lines are updated after window is created and DOM settles requestAnimationFrame(() => {