The best way to control Claude Code, Codex and more from any computer or phone
feat(web): show how many subagents are running at a glance (#5745)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Theo Browne committed
Aug 8, 2026 at 19:20 UTC
c2f8cb7ca1576afd70294b98dfe1de9be17aacae
3 files changed
+48
-3
apps/web/src/components/ChatView.tsx
+7
@@ -5913,6 +5913,11 @@ function ChatViewContent(props: ChatViewProps) {
5913
rightPanelAvailable={activeProject !== null}
5914
rightPanelOpen={rightPanelOpen}
5915
rightPanelShortcutLabel={shortcutLabelForCommand(keybindings, "rightPanel.toggle")}
5916
+ // Suppressed while the Agents surface is visible: the roster itself is
5917
+ // on screen, so the toggle badge would be pointing at nothing.
5918
+ liveAgentCount={
5919
+ rightPanelOpen && activeRightPanelSurface?.kind === "agents" ? 0 : agentPanelModel.liveCount
5920
+ }
5921
onToggleTerminal={toggleTerminalVisibility}
5922
onToggleRightPanel={toggleRightPanel}
5923
/>
@@ -6419,6 +6424,7 @@ function ChatViewContent(props: ChatViewProps) {
6424
browserAvailable={isPreviewSupportedInRuntime()}
6425
diffAvailable={isServerThread && isGitRepo}
6426
filesAvailable={activeProject !== null}
6427
+ liveAgentCount={agentPanelModel.liveCount}
6428
>
6429
{rightPanelContent}
6430
</RightPanelTabs>
@@ -6447,6 +6453,7 @@ function ChatViewContent(props: ChatViewProps) {
6453
browserAvailable={isPreviewSupportedInRuntime()}
6454
diffAvailable={isServerThread && isGitRepo}
6455
filesAvailable={activeProject !== null}
6456
+ liveAgentCount={agentPanelModel.liveCount}
6457
>
6458
{rightPanelContent}
6459
</RightPanelTabs>
apps/web/src/components/RightPanelTabs.tsx
+20
-1
@@ -48,6 +48,8 @@ interface RightPanelTabsProps {
48
browserAvailable: boolean;
49
diffAvailable: boolean;
50
filesAvailable: boolean;
51
+ /** Running + waiting subagents; badges the Agents card in the empty state. */
52
+ liveAgentCount: number;
53
children: ReactNode;
54
}
55
@@ -96,6 +98,7 @@ function RightPanelEmptyState(props: {
98
browserAvailable: boolean;
99
diffAvailable: boolean;
100
filesAvailable: boolean;
101
+ liveAgentCount: number;
102
}) {
103
const actions = [
104
{
@@ -105,6 +108,7 @@ function RightPanelEmptyState(props: {
108
available: props.browserAvailable,
109
disabledReason: SURFACE_DISABLED_REASONS.browser,
110
onClick: props.onAddBrowser,
111
+ badgeCount: 0,
112
},
113
{
114
label: "Terminal",
@@ -113,6 +117,7 @@ function RightPanelEmptyState(props: {
117
available: true,
118
disabledReason: null,
119
onClick: props.onAddTerminal,
120
+ badgeCount: 0,
121
},
122
{
123
label: "Files",
@@ -121,6 +126,7 @@ function RightPanelEmptyState(props: {
126
available: props.filesAvailable,
127
disabledReason: SURFACE_DISABLED_REASONS.files,
128
onClick: props.onAddFiles,
129
+ badgeCount: 0,
130
},
131
{
132
label: "Diff",
@@ -129,6 +135,7 @@ function RightPanelEmptyState(props: {
135
available: props.diffAvailable,
136
disabledReason: SURFACE_DISABLED_REASONS.diff,
137
onClick: props.onAddDiff,
138
+ badgeCount: 0,
139
},
140
{
141
label: "Agents",
@@ -137,6 +144,7 @@ function RightPanelEmptyState(props: {
144
available: true,
145
disabledReason: null,
146
onClick: props.onAddAgents,
147
+ badgeCount: props.liveAgentCount,
148
},
149
] as const;
150
@@ -154,7 +162,17 @@ function RightPanelEmptyState(props: {
162
const Icon = action.icon;
163
const content = (
164
<>
157
- <Icon className="mb-3 size-5" />
165
+ <span className="relative mb-3 inline-flex">
166
+ <Icon className="size-5" />
167
+ {action.badgeCount > 0 ? (
168
+ <span
169
+ aria-hidden
170
+ className="absolute -top-1.5 -right-2 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-info px-1 text-[9px] font-semibold tabular-nums text-white"
171
+ >
172
+ {action.badgeCount}
173
+ </span>
174
+ ) : null}
175
+ </span>
176
<span className="text-sm font-medium">{action.label}</span>
177
<span className="mt-1 text-xs leading-relaxed text-muted-foreground">
178
{action.description}
@@ -498,6 +516,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
516
browserAvailable={props.browserAvailable}
517
diffAvailable={props.diffAvailable}
518
filesAvailable={props.filesAvailable}
519
+ liveAgentCount={props.liveAgentCount}
520
/>
521
) : (
522
props.children
apps/web/src/components/chat/PanelLayoutControls.tsx
+21
-2
@@ -11,6 +11,8 @@ interface PanelLayoutControlsProps {
11
rightPanelAvailable: boolean;
12
rightPanelOpen: boolean;
13
rightPanelShortcutLabel: string | null;
14
+ /** Running + waiting subagents in this thread; badges the right panel toggle. */
15
+ liveAgentCount: number;
16
onToggleTerminal: () => void;
17
onToggleRightPanel: () => void;
18
}
@@ -22,6 +24,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
24
rightPanelAvailable,
25
rightPanelOpen,
26
rightPanelShortcutLabel,
27
+ liveAgentCount,
28
onToggleTerminal,
29
onToggleRightPanel,
30
}: PanelLayoutControlsProps) {
@@ -59,18 +62,34 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
62
className="shrink-0 [-webkit-app-region:no-drag]"
63
pressed={rightPanelOpen}
64
onPressedChange={onToggleRightPanel}
62
- aria-label="Toggle right panel"
65
+ aria-label={
66
+ liveAgentCount > 0
67
+ ? `Toggle right panel, ${liveAgentCount} ${liveAgentCount === 1 ? "agent" : "agents"} working`
68
+ : "Toggle right panel"
69
+ }
70
variant="ghost"
71
size="sm"
72
disabled={!rightPanelAvailable}
73
>
74
<PanelRightIcon className="size-3.5" />
75
+ {liveAgentCount > 0 ? (
76
+ <span
77
+ aria-hidden
78
+ className="absolute -top-1 -right-1 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-info px-1 text-[9px] font-semibold tabular-nums text-white"
79
+ >
80
+ {liveAgentCount}
81
+ </span>
82
+ ) : null}
83
</Toggle>
84
}
85
/>
86
<TooltipPopup side="bottom">
87
{rightPanelAvailable
73
- ? `Toggle right panel${rightPanelShortcutLabel ? ` (${rightPanelShortcutLabel})` : ""}`
88
+ ? `Toggle right panel${rightPanelShortcutLabel ? ` (${rightPanelShortcutLabel})` : ""}${
89
+ liveAgentCount > 0
90
+ ? ` · ${liveAgentCount} ${liveAgentCount === 1 ? "agent" : "agents"} working`
91
+ : ""
92
+ }`
93
: "Right panel is unavailable"}
94
</TooltipPopup>
95
</Tooltip>