diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx
index 42ac5fbe080..9f25eeafbd9 100644
--- a/packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx
+++ b/packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx
@@ -25,6 +25,7 @@ export function Sidebar(props: { sessionID: string; overlay?: boolean }) {
diff: true,
todo: true,
lsp: true,
+ subagents: true,
})
// Sort MCP servers alphabetically for consistent display order
@@ -63,6 +64,13 @@ export function Sidebar(props: { sessionID: string; overlay?: boolean }) {
const directory = useDirectory()
const kv = useKV()
+ const subagents = createMemo(() =>
+ sync.data.session
+ .filter((x) => x.parentID === props.sessionID)
+ .map((x) => x.id)
+ .toSorted((a, b) => (a < b ? -1 : a > b ? 1 : 0)),
+ )
+
const hasProviders = createMemo(() =>
sync.data.provider.some((x) => x.id !== "opencode" || Object.values(x.models).some((y) => y.cost?.input !== 0)),
)
@@ -229,6 +237,53 @@ export function Sidebar(props: { sessionID: string; overlay?: boolean }) {
+ 0}>
+
+ subagents().length > 2 && setExpanded("subagents", !expanded.subagents)}
+ >
+ 2}>
+ {expanded.subagents ? "▼" : "▶"}
+
+
+ Subagents
+
+ ({subagents().length})
+
+
+
+
+
+ {(id) => {
+ const status = createMemo(() => sync.session.status(id))
+ const title = createMemo(() => sync.session.get(id)?.title ?? id)
+ return (
+
+
+ •
+
+
+
+ {title()}
+
+
+ {status() === "idle" ? "idle" : "working"}
+
+
+
+ )
+ }}
+
+
+
+
0}>