- {(isRunning || exited || isUnread) && (
+ {(isRunning || exited || isRecentlyCompleted || isUnread) && (
diff --git a/components/SessionSidebar.tsx b/components/SessionSidebar.tsx
index 07a10653c..5d37da060 100644
--- a/components/SessionSidebar.tsx
+++ b/components/SessionSidebar.tsx
@@ -16,6 +16,15 @@ import { compileSearchQuery, FIRST_MESSAGE_WEIGHT, scoreSearchFields, searchFiel
import { Archive, ArrowDownUp, ArrowLeft, ArrowRight, Check, ChevronRight, FileUp, Loader2, Plus, RefreshCw, Search, Settings2, SlidersHorizontal, X } from "lucide-react";
import { publishSessionsChanged } from "@/lib/session-change-bus";
import { openEventStream } from "@/lib/event-stream";
+import {
+ loadRecentRuns,
+ recordCompletedRun,
+ removeActiveFromCompleted,
+ saveRecentRuns,
+ seedRecentRuns,
+ type RecentRunEntry,
+} from "@/lib/recent-runs";
+import { useRecentRunsLimit } from "@/hooks/useRecentRunsLimit";
import {
EMPTY_PROJECT_SET,
INITIAL_RESTORE_MAX_ATTEMPTS,
@@ -130,7 +139,38 @@ export const SessionSidebar = memo(function SessionSidebar({ selectedSessionId,
const [runningSessionCwds, setRunningSessionCwds] = useState
>({});
const [exitedSessions, setExitedSessions] = useState