/tool-integrations:agent-session-forensicsfrom tool-integrations
Diagnoses interrupted agent sessions, missing tool results, timing bottlenecks, and subagent trace correlation by inspecting session history files with jq.
Ships in tool-integrations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
jq or equivalent JSON tooling available.Inventory session files — find metadata, current history, rotated previous history, and related subagent histories.
Count and list last turns:
jq 'length' history.json # total messages
jq '.[-10:] | .[] | {role, stop_reason}' history.json # last 10 turns
jq '.[] | select(.role=="assistant") | .tool_calls[].id' history.json # tool call IDs
jq '.[] | select(.role=="user") | .tool_results[]?.tool_call_id' history.json # results
Correlate tool call IDs — every tool_call in an assistant turn must have a matching tool_result in the immediately following user turn. Find the first gap.
Check timing for slow calls:
jq '.[] | select(.timing) | {role, duration_ms: .timing.duration_ms}' history.json
Identify failure pattern — see table below.
Repair (if approved) — write a backup first (cp history.json history.json.bak), then make the smallest possible fix at the last valid correlation boundary.
| Symptom | Likely cause | Repair |
|---|---|---|
| Tool call with no result turn | Session interrupted mid-tool | Truncate after last matched pair |
| Two consecutive user turns | Duplicate message insertion | Remove the duplicate |
tool_result with no prior tool_call | Corrupted or manually edited history | Remove orphan result |
Empty content on assistant turn | Model returned no text + no tools | Usually safe to truncate |
| Session loops without progress | Missing result causes re-prompt | Inject minimal synthetic result |
references/history-diagnostics.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub yeaight7/agent-powerups --plugin tool-integrations7 skills in this plugin
/agent-runtime-patternsUse when optimizing agent runtime loops, card packs, MCP session lifecycle, tool-call count, or multi-agent orchestration patterns./browser-automation-safetyUse when validating rendered web pages, local dev servers, browser automation, screenshots, forms, auth sessions, or UI evidence with strict browser safety boundaries./filesystem-mcp-guardrailsUse when designing or reviewing filesystem MCP access, path boundaries, allowed roots, method allowlists, and safe local file operations.2 plugins in one repository ship this exact skill · first indexed Jul 28, 2026
Other plugins' skills for the same job