diff --git a/CLAUDE.md b/CLAUDE.md
index 3827e46b..92adf03c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -21,7 +21,7 @@ When user says "COM": 1) Increment version in BOTH `package.json` AND `CLAUDE.md
Claudeman is a Claude Code session manager with a web interface and autonomous Ralph Loop. It spawns Claude CLI processes via PTY, streams output in real-time via SSE, and supports scheduled/timed runs.
-**Version**: 0.1385 (must match `package.json`)
+**Version**: 0.1386 (must match `package.json`)
**Tech Stack**: TypeScript (ES2022/NodeNext, strict mode), Node.js, Fastify, Server-Sent Events, node-pty
diff --git a/package.json b/package.json
index 7ca7d95f..3174caf7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "claudeman",
- "version": "0.1385",
+ "version": "0.1386",
"description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence",
"type": "module",
"main": "dist/index.js",
diff --git a/src/web/public/app.js b/src/web/public/app.js
index e911cbc5..7a72529a 100644
--- a/src/web/public/app.js
+++ b/src/web/public/app.js
@@ -1980,7 +1980,7 @@ class ClaudemanApp {
onmouseenter="app.showSubagentDropdown(this)"
onmouseleave="app.scheduleHideSubagentDropdown(this)"
onclick="event.stopPropagation(); app.pinSubagentDropdown(this);">
- ${minimizedAgents.size}
+ Agent${minimizedAgents.size}
${agentItems.join('')}
@@ -5752,14 +5752,14 @@ class ClaudemanApp {
if (!windowData) return;
const agent = this.subagents.get(agentId);
- const parentSessionId = agent?.parentSessionId;
+ const parentSessionId = agent?.parentSessionId || this.activeSessionId;
+ // Always minimize to tab (use active session if no parent)
+ windowData.element.style.display = 'none';
+ windowData.minimized = true;
+
+ // Track minimized agent for the session
if (parentSessionId) {
- // Minimize to tab instead of removing
- windowData.element.style.display = 'none';
- windowData.minimized = true;
-
- // Track minimized agent for the parent session
if (!this.minimizedSubagents.has(parentSessionId)) {
this.minimizedSubagents.set(parentSessionId, new Set());
}
@@ -5767,15 +5767,10 @@ class ClaudemanApp {
// Update tab badge to show minimized agents
this.renderSessionTabs();
-
- // Persist the state change
- this.saveSubagentWindowStates();
- } else {
- // No parent session - fully remove the window
- windowData.element.remove();
- this.subagentWindows.delete(agentId);
}
+ // Persist the state change
+ this.saveSubagentWindowStates();
this.updateConnectionLines();
}
@@ -5820,8 +5815,15 @@ class ClaudemanApp {
restoreSubagentWindow(agentId) {
const windowData = this.subagentWindows.get(agentId);
+ const agent = this.subagents.get(agentId);
+
+ // If window doesn't exist but agent does, recreate it
+ if (!windowData && agent) {
+ this.createSubagentWindow(agentId);
+ return;
+ }
+
if (windowData) {
- const agent = this.subagents.get(agentId);
const settings = this.loadAppSettingsFromStorage();
const activeTabOnly = settings.subagentActiveTabOnly ?? false;
diff --git a/src/web/public/styles.css b/src/web/public/styles.css
index b774e6df..11d15527 100644
--- a/src/web/public/styles.css
+++ b/src/web/public/styles.css
@@ -2958,11 +2958,11 @@ kbd {
display: inline-flex;
align-items: center;
justify-content: center;
- min-width: 16px;
+ gap: 2px;
height: 16px;
- padding: 0 4px;
+ padding: 0 5px;
border-radius: 8px;
- font-size: 0.65rem;
+ font-size: 0.6rem;
cursor: pointer;
background: var(--accent);
color: white;
@@ -2972,7 +2972,14 @@ kbd {
.session-tab .tab-subagent-badge:hover {
background: var(--accent-hover);
- transform: scale(1.1);
+ transform: scale(1.05);
+}
+
+.session-tab .tab-subagent-badge .subagent-label {
+ font-size: 0.55rem;
+ opacity: 0.85;
+ text-transform: uppercase;
+ letter-spacing: 0.02em;
}
.session-tab .tab-subagent-badge .subagent-count {