Hookyard
Back to directory
SubagentStopdemo

Subagent Cost Log

Log token spend each time a subagent finishes.

Appends a line to ~/.claude/cost.log with timestamp and approximate spend on every SubagentStop.

Install via CLI

npx hookyard install subagent-cost-log

Or paste into ~/.claude/settings.json

{
  "hooks": {
    "SubagentStop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "$HOME/.claude/hooks/log-subagent-cost.sh"
          }
        ]
      }
    ]
  }
}
#telemetry#cost

By developersdigest