diff --git a/apps/web/app/components/workspace/chat-sessions-sidebar.tsx b/apps/web/app/components/workspace/chat-sessions-sidebar.tsx index 24d16a5dba0..b3e9e5b7bf4 100644 --- a/apps/web/app/components/workspace/chat-sessions-sidebar.tsx +++ b/apps/web/app/components/workspace/chat-sessions-sidebar.tsx @@ -220,8 +220,13 @@ export function ChatSessionsSidebar({ return map; }, [subagents]); + const filteredSessions = useMemo( + () => sessions.filter((s) => !s.id.includes(":subagent:")), + [sessions], + ); + // Group sessions: today, yesterday, this week, this month, older - const grouped = groupSessions(sessions); + const grouped = groupSessions(filteredSessions); const width = mobile ? "280px" : (widthProp ?? 260); const headerHeight = 40; // px — match padding so list content clears the overlay diff --git a/apps/web/lib/active-runs.ts b/apps/web/lib/active-runs.ts index 86077afa451..0bc2282b437 100644 --- a/apps/web/lib/active-runs.ts +++ b/apps/web/lib/active-runs.ts @@ -1557,12 +1557,17 @@ function upsertMessage( if (!found) { updated.push(JSON.stringify(message)); - updateIndex(sessionId, { incrementCount: 1 }); - } else { - updateIndex(sessionId, {}); } writeFileSync(fp, updated.join("\n") + "\n"); + + if (!sessionId.includes(":subagent:")) { + if (!found) { + updateIndex(sessionId, { incrementCount: 1 }); + } else { + updateIndex(sessionId, {}); + } + } } function cleanupRun(sessionId: string) {