Skip to main content

Agent Tracker

PostToolUse:AgenttrackingEnabled by default

Tracks active subagents in a session bridge file so the statusline can display live agent activity.

Why use this

When Claude spawns parallel subagents you have no visibility into what they're doing. This hook feeds the statusline with live subagent data — names, models, elapsed time — so you always know what's running.

Lifecycle

Where in the Claude Code session this hook fires.

SessionStart
PreToolUse
PostToolUse
Stop
Notification
Post Tool Use

Fires after each tool call completes.

Fires only when the tool matches: Agent

How it works

After each Agent tool invocation, updates a per-session JSON file in /tmp with each subagent's id, description, model, and start/finish times. Prunes agents older than 10 minutes automatically. The statusline reads this file for real-time subagent status.

settings.json

What the hook configuration looks like in ~/.claude/settings.json after install.

~/.claude/settings.json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Agent",
        "hooks": [
          {
            "type": "command",
            "command": "node ~/.claude/plugins/tonone-ai/tonone/tonone-agent-tracker.js"
          }
        ]
      }
    ]
  }
}

Install

This hook

Install Agent Tracker

1. Add to marketplace

$ claude plugin marketplace add tonone-ai/tonone

2. Install this hook

$ claude plugin install agent-tracker@tonone-ai

More tracking hooks

All hooks

Ready to use Agent Tracker?