[FEATURE] Show a last-used date for each agent in the /agents view

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 23, 2026

Problem Statement

The /agents view lists every agent available in the session — built-ins plus anything defined in ~/.claude/agents/ and .claude/agents/ — but gives no indication of which ones are actually being used.

Custom agents accumulate. You write one for a specific task, it works, and it stays in the list forever. Six months later the picker has a dozen entries and there is no way to tell, from the view itself, which ones you reach for weekly and which ones you wrote once and never invoked again. That makes the list harder to scan over time, and it makes pruning a guessing game: deleting an agent definition means opening the file, trying to remember the task it was for, and hoping you are not about to remove something a teammate's project config depends on.

This gets worse in shared repos, where project-scoped agents arrive via .claude/agents/ from other people. There is currently no signal at all about whether the team is using them.

Proposed Solution

Show a last-used date for each agent in the /agents view — a right-aligned relative timestamp on each row, in the style of 2d ago / 3w ago / never.

Ideally paired with:

  • Sorting the list by most-recently-used (or offering it as a sort option), so the agents you actually use rise to the top.
  • Exposing the same field in claude agents --json as an ISO-8601 lastUsedAt (null when never invoked), so it can be scripted against.

"Used" should mean the agent was invoked as a subagent — i.e. a Task/Agent tool call resolved to that agent type — not merely that its file was read or the picker was opened.

Alternative Solutions

The data already exists locally, which is what makes this feel like a display gap rather than a telemetry problem. Session transcripts under ~/.claude/projects/<project>/*.jsonl record each invocation as "subagent_type":"<name>" on the tool-use entry, alongside a "timestamp" field, and subagent runs get their own transcript files under <session-id>/subagents/agent-*.jsonl.

So today the workaround is to grep it out yourself:

grep -rho '"subagent_type":"[^"]*"' ~/.claude/projects/ | sort | uniq -c | sort -rn

That gets you counts, and with a bit more work per-agent recency. But it means shelling out to reconstruct something the view could just render, it only covers transcripts still on that machine, and it is not discoverable — nobody is going to find this on their own.

Priority

Low - Nice to have

Feature Category

Interactive mode (TUI)

Use Case Example

  1. Over a few months I accumulate custom agents in ~/.claude/agents/ for various one-off jobs.
  2. The /agents list gets long enough that finding the one I want takes real scanning.
  3. I want to clean it up, but I cannot tell which entries are dead weight — every row looks identical.
  4. With a last-used column I open /agents, immediately see which ones say never or 8mo ago, and delete exactly those. The ones marked 2d ago I leave alone.

The same column would also be useful in the background-agents list for spotting stale entries, though the primary ask here is the agent-type picker.

Additional Context

Related but distinct existing issues:

  • #82282 — show which model each background agent is running on, in the agents view and claude agents --json. Same surface, same "the view should show more per-agent metadata" theme.
  • #88907 / #88177 — ordering and oversight in the agents panel, which are about running background agents rather than configured agent types.

Observed on Claude Code v2.1.241 (CLI, Linux).

View original on GitHub ↗