Sort stopped agents below active sessions in sidebar - #3
Merged
Conversation
After a server restart the reconnect timer calls ensureTerminalConnected which immediately hits the agent status API. That API call was outside the try-catch block, so a network error (server still booting) threw an uncaught exception, silently exiting the function without rescheduling — leaving the terminal stuck at "Session disconnected, reconnecting...". Fix: wrap the agent status fetch in its own try-catch. On network failure, schedule a backoff retry using the same logic as scheduleReconnect so the loop continues until the server is reachable again. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents with no running tmux session (stopped, error, unknown) now sort below agents that are running, creating, or stopping — so stopping a session no longer bumps an agent above live ones via activity timestamp. Priority order: blocked → waiting_user → active session → no session. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 tasks
selfcontained
added a commit
that referenced
this pull request
Jul 8, 2026
…s, seed data - Restyle feedback items as bordered cards with visual separation (#5) - Clip long file paths from the left using direction:rtl so filenames stay visible (#1) - Add framer-motion AnimatePresence expand/collapse on feedback item detail (#3) - Dim file links not found in current diff with tooltip fallback (#2) - Fix file navigation to only scroll when target file exists in diff (#2) - Add review seed data with resolved/pending items and thread messages (#4) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
blocked→waiting_user→ active session (running,creating,stopping) → no session (stopped,error,unknown)Problem
Stopping an agent updates its activity timestamp, which caused it to jump to the top of the sidebar above agents with live, attachable sessions.
Test plan
crumbstream(stopped, 1h ago) sorted abovemedia-streaming(running, 1h ago); after: all 4 running agents group at top, both stopped agents at bottom🤖 Generated with Claude Code