Developer Builds Logging System to Identify Unused Claude Code Subagents
A developer discovered that 44 of their defined Claude Code subagents had gone unused over 30 days, prompting them to build a tracking system. The solution uses a Stop hook script that parses session transcripts at session end and appends invocation data to a JSONL log file. A scheduled daily report aggregates usage counts over 7-day and 30-day windows, producing a summary that highlights the top 10 agents and lists those with zero invocations. The system addresses a gap in Claude Code where there is no built-in mechanism to track whether defined agents are actually being called across sessions. By identifying these so-called zombie agents, developers can make evidence-based decisions about pruning their agent directories and reducing unnecessary context loaded at startup.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in