[FEATURE] Agent view: stable sort mode (fixed order + status as indicator) to stop constant reordering

Open 💬 2 comments Opened Jun 10, 2026 by jmealy

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

In the claude agents view, sessions are constantly reordered as I work. The list pins running sessions to the top and orders the rest by start time, so the moment a session flips in or out of running it jumps between groups and everything shifts position. I lose track of where a given session was, and positional muscle memory never holds.

The current comparator (from the 2.1.170 bundle) pins running first, then sorts the rest by start time descending — there's no branch that reads a stable key, which is the root of the reshuffling.

Proposed Solution

Add a stable sort mode for the agent view: keep sessions in a fixed order (e.g. creation/insertion order) and rely on the existing status indicator (text/colour) to convey state, instead of using status as the primary sort key. Sessions would stay put; I'd read their state from the status column rather than from their position.

Expose it as either:

  • a settings key, e.g. agentViewSort: "stable" | "running-first" (default running-first to preserve current behaviour), and/or
  • a toggle key in the view to cycle sort modes.

Related

  • #58243 asks for the inverse within the current grouping model (sort each group by most recently updated rather than created). Both are really requests for configurable agent-view sort — a stable mode and an updated-time mode are two options of the same toggle, so it may make sense to address them together.
  • #60241 asks to expose AgentView as a rebindable keybindings context, which a sort-mode toggle key could plug into.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI) / Agent view

Environment

  • Claude Code 2.1.170
  • Linux

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗