Skip to content

feat: smart priority scoring for session ranking #23

@matoushavlena

Description

@matoushavlena

Summary

Priority: P0 | Category: Attention Routing

Rank sessions by a composite priority score so the user always knows where their attention has the highest ROI — no more guessing which terminal to check next.

Problem

When you have multiple agent sessions running, you have to manually decide which one to check next. You guess. You pick the one you remember. You often pick wrong, wasting time on a session that's fine while another one has been stuck waiting for you.

The cost of picking wrong compounds: every minute an agent waits for your input is a minute of lost parallel productivity. And when you finally get to the stuck session, you've lost context and need to re-orient.

Proposed Solution

Rank sessions by a composite priority score that accounts for:

Context Depth

How much you've invested in this session (turns, time spent, decisions made). Sessions where you're deepest should rank higher — re-entry cost is lowest and sunk cost of abandoning is highest. (Related: #20)

Project Urgency

User-defined or inferred priority of the project/repo. A production hotfix outranks a refactor.

Wait Time

How long the session has been waiting for human input. Longer wait = higher urgency, weighted against other factors. (Related: #16 bottleneck detection)

Agent State

Is the agent blocked on an approval? Thinking? Actively working? Blocked agents get boosted. (Related: #19 approval queue)

The score should surface a clear answer to: "Where does my attention have the highest ROI right now?"

Acceptance Criteria

  • Sessions are sorted by priority score, not by recency or alphabetical order
  • The top session is always the one where user attention creates the most value
  • Score updates in real-time as agent states change
  • User can understand why a session is ranked where it is (tooltip or subtle indicator)

Open Questions

  • Should users be able to manually override/pin priority?
  • Should project-level priority be explicit (user sets it) or inferred (from git branch names, repo metadata)?
  • How to handle the cold start when a session is new and has no history?
  • How does this interact with the unified approval queue (feat: unified approval queue across all sessions #19)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions