From toolkit
Displays a table of agents spawned in the current Claude Code session with line numbers, relative timestamps, agent types, task descriptions, and triggering user messages.
npx claudepluginhub dwmkerr/claude-toolkit --plugin toolkit# Agent History
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.
## Instructions
1. **Use Bash to run grepsession.sh**
This outputs matching lines with line numbers from the current session.
2. **Parse the output**
Each line is JSONL with this structure:
Extract:
- **Line number**: from grep prefix (e.g., `1247:{...}`)
- **Time**: from `.timestamp`
- **Agent**: from `.message.content[].input.subag.../pipeline-statusDisplays agent pipeline execution status for current session: agents run, statuses, timestamps, durations, tools used, and pipeline completeness from JSON log.
/buidl-traceDisplays agent execution trace for the current loop session from trace.jsonl, rendering table of timestamps, events, agents, phases, cycles, details, plus summary of events, agents, and errors.
/search-sessionsSearches past Claude Code and OpenClaw session history by metadata (default, instant) or full message content (--deep), listing matches with project, date, summary, and UUID for resuming. Supports --limit N, --project FILTER, --openclaw, --agent NAME.
Share bugs, ideas, or general feedback.
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 jq