You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-xpzp--sessions-list...

1.6 KiB

title status type priority created_at updated_at parent blocked_by
`sessions list` should show sub-agent run count per session todo bug normal 2026-03-30T04:40:53Z 2026-03-30T04:43:26Z claudbg-tci9
claudbg-33n0

Problem

sessions list has no column showing how many sub-agent runs a session spawned, making it impossible to identify sessions that used the Agent tool.

Expected behavior

Add a Sub-agents column to sessions list showing the count of sub-agent JSONL files associated with each session. Zero for sessions with no sub-agents.

Disk structure (important)

The actual subagent files live at:

~/.claude/projects/<project-dir>/<session-uuid>/subagents/agent-<id>.jsonl

Note: there is a directory named <session-uuid> (without .jsonl) alongside the session file that contains the subagents/ folder.

The existing discover_agents_for_session(session_file) function currently looks in the wrong place (see separate bug). Once that is fixed, the agent count can be obtained by calling discover_agents_for_session for each session and taking .len().

Implementation notes

  • In sessions list, after syncing sessions, call discover_agents_for_session(&session_ref.file_path) for each session to get the count.
  • Add the count as the last column in the table row.
  • Update JSON output to include subagents field.
  • This is blocked on the subagent path discovery bug being fixed first.

Relevant files

  • src/commands/sessions.rslist() function
  • src/parser/discovery.rsdiscover_agents_for_session