/toolkit:agent-historyfrom toolkit
Shows all agents spawned during the current Claude Code session, including timestamps, agent types, task descriptions, and the user messages that triggered them.
Ships in toolkit. Installing the plugin adds it to Claude Code.
Show which agents were spawned during the current Claude Code session.
CRITICAL: Do NOT read the session file directly - it's too large. Use the Bash tool to run grepsession.sh which filters efficiently.
Use Bash to run grepsession.sh
${CLAUDE_PLUGIN_ROOT}/scripts/grepsession.sh '"name":"Task"'
This outputs matching lines with line numbers from the current session.
Parse the output
Each line is JSONL with this structure:
{
"type": "assistant",
"timestamp": "2025-01-05T09:23:15.123Z",
"message": {
"content": [
{
"type": "tool_use",
"name": "Task",
"input": {
"description": "Research Claude plugins",
"subagent_type": "dwmkerr:researcher",
"prompt": "..."
}
}
]
}
}
Extract:
1247:{...}).timestamp.message.content[].input.subagent_type.message.content[].input.descriptionIf you need more context
${CLAUDE_PLUGIN_ROOT}/scripts/grepsession.sh '"name":"Task"' -C 5
Or use Read tool with offset/limit on the session file.
To find what triggered each agent
Look for the most recent user message before each agent. User messages have this structure:
{
"type": "user",
"timestamp": "2025-01-05T09:23:00.000Z",
"message": {
"content": "are there github repos showing how to check skills?"
}
}
Display results
Format timestamps as relative time (e.g., "3m ago", "1h ago", "2d ago").
## Agents Spawned This Session
| Line | When | Agent | Task | Triggered By |
|------|----------|----------------|------------------------------|----------------------------|
| 1247 | 2h ago | researcher | Research Claude plugins | "are there github repos..."
| 1389 | 1h ago | researcher | Clone and examine repo | "are there github repos..."
**Total**: 2 agents spawned
grepsession.sh script from the skills plugingrepsession.sh directly and pipe to jqWhat the command file sets; muted values are Claude Code's defaults
agent-history, session-log, agent-tracking, debugging, claude-code
7-day visitors to each command page
5 commands in this plugin
npx claudepluginhub dwmkerr/claude-toolkit --plugin toolkitOther plugins' commands for the same job