Summary
In the top agent tab bar (the row that shows the Claude / Codex agent tab and its close ×), the "+" (add agent) button disappears once you close the original agent tab that first spawned on the repo, as long as at least one other agent tab remains. After that you can no longer add more agents from the tab bar.
Issue Type
Bug
Priority
Medium — the feature is still reachable by other means, but the primary affordance for adding an agent silently vanishes and leaves the repo in a stuck state.
Agent Context
- App: Manifold (Claude Code v2.1.185, Opus 4.8, Claude Enterprise)
- Reported from repo
MANIFOLD, worktree fix-issue-context-capture (Stjørdal)
Area
area:renderer — dock tab header (agent tab bar) / agent sibling panels. Not the Repositories sidebar.
Expected Behavior
The "+" add-agent button should remain available on the active agent tab regardless of which agent tab was closed, as long as at least one agent session for that repo/worktree is running or waiting.
Actual Behavior
With two agent tabs open on the same repository, closing the first/original tab (the one created with panel id agent) removes the "+" button from the tab bar. The remaining tab is a sibling panel (id agent:<sessionId>), and it never renders the add-agent button, so no further agents can be added from the tab bar.
Steps to Reproduce
- Open a repository and start an agent (creates the primary agent tab, e.g.
Claude).
- Click "+" in the tab bar to add a second agent to the same repository (creates a sibling tab).
- Close the original (first) agent tab.
- Observe: the "+" button is gone from the tab bar; you can no longer add agents.
Evidence
Screenshot provided in chat (not uploaded to GitHub): the top tab bar shows a single remaining agent tab (Claude ×) with no "+" affordance.
Suspected Cause
The add-sibling button visibility is gated on the panel id being exactly 'agent', rather than on the panel being any agent panel (primary or sibling).
src/renderer/DockTab.tsx:29:
const showAddSibling = api.id === 'agent'
&& state != null
&& (state.activeSessionStatus === 'running' || state.activeSessionStatus === 'waiting')
- The initial agent panel is always created with id
'agent' (src/renderer/hooks/dock-layout/dock-layout-builders.ts).
- Additional agents are created as sibling panels with ids
agent:<sessionId> (src/renderer/hooks/agent-siblings.ts, useAgentSiblingDockTabs.ts).
When the primary 'agent' panel is closed, only agent:<sessionId> sibling(s) remain. Since api.id === 'agent' is now false for every remaining panel, showAddSibling is always false and AddSiblingAgentButton is never rendered in the tab bar.
Suggested Next Step
Broaden the showAddSibling check in DockTab.tsx to include sibling agent panels. The existing helper isSiblingPanelId in src/renderer/hooks/agent-siblings.ts already covers the agent: prefix:
import { isSiblingPanelId, parseSiblingSessionId } from './hooks/agent-siblings'
const isAgentPanel = api.id === 'agent' || isSiblingPanelId(api.id)
const showAddSibling = isAgentPanel
&& state != null
&& (state.activeSessionStatus === 'running' || state.activeSessionStatus === 'waiting')
Validation After Fix
- Start two agents on the same repository.
- Close the original (
agent) tab.
- Confirm the "+" button still appears in the tab bar on the remaining sibling tab and successfully launches a third agent.
- Also confirm closing a sibling tab (leaving only the primary) still shows "+".
Summary
In the top agent tab bar (the row that shows the
Claude/Codexagent tab and its close×), the "+" (add agent) button disappears once you close the original agent tab that first spawned on the repo, as long as at least one other agent tab remains. After that you can no longer add more agents from the tab bar.Issue Type
Bug
Priority
Medium — the feature is still reachable by other means, but the primary affordance for adding an agent silently vanishes and leaves the repo in a stuck state.
Agent Context
MANIFOLD, worktreefix-issue-context-capture(Stjørdal)Area
area:renderer— dock tab header (agent tab bar) / agent sibling panels. Not the Repositories sidebar.Expected Behavior
The "+" add-agent button should remain available on the active agent tab regardless of which agent tab was closed, as long as at least one agent session for that repo/worktree is running or waiting.
Actual Behavior
With two agent tabs open on the same repository, closing the first/original tab (the one created with panel id
agent) removes the "+" button from the tab bar. The remaining tab is a sibling panel (idagent:<sessionId>), and it never renders the add-agent button, so no further agents can be added from the tab bar.Steps to Reproduce
Claude).Evidence
Screenshot provided in chat (not uploaded to GitHub): the top tab bar shows a single remaining agent tab (
Claude ×) with no "+" affordance.Suspected Cause
The add-sibling button visibility is gated on the panel id being exactly
'agent', rather than on the panel being any agent panel (primary or sibling).src/renderer/DockTab.tsx:29:'agent'(src/renderer/hooks/dock-layout/dock-layout-builders.ts).agent:<sessionId>(src/renderer/hooks/agent-siblings.ts,useAgentSiblingDockTabs.ts).When the primary
'agent'panel is closed, onlyagent:<sessionId>sibling(s) remain. Sinceapi.id === 'agent'is now false for every remaining panel,showAddSiblingis always false andAddSiblingAgentButtonis never rendered in the tab bar.Suggested Next Step
Broaden the
showAddSiblingcheck inDockTab.tsxto include sibling agent panels. The existing helperisSiblingPanelIdinsrc/renderer/hooks/agent-siblings.tsalready covers theagent:prefix:Validation After Fix
agent) tab.