PulseAugur
EN
LIVE 02:12:27

Claude Code users track subagent usage to prune unused agents

This post details a system for tracking the usage of subagents within the Claude Code environment to identify and remove unused "zombie" agents. The solution involves a stop hook script that logs agent invocations to a JSONL file upon session termination. A separate script then processes this log to generate daily reports, highlighting the top-used agents and listing those that have not been invoked in the past 7 or 30 days. This process helps maintain the Claude Code setup by providing data-driven decisions for agent deletion. AI

IMPACT Helps users manage and optimize their AI agent configurations for better efficiency.

RANK_REASON The item describes a custom script and logging system for managing a specific feature of the Claude Code environment, rather than a new product release or core research.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code users track subagent usage to prune unused agents

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Lily ·

    Hunting Down Zombie Agents: Logging Subagent Usage with a Claude Code Stop Hook

    <p>Quick question: how many of the subagents you've defined in <code>~/.claude/agents/</code> have actually been called this month? I couldn't have told you — until I started measuring, and this morning's tally revealed <strong>44 agents that hadn't been invoked even once in 30 d…