From tool-integrations
Diagnoses interrupted agent sessions, missing tool results, timing bottlenecks, and subagent trace correlation by inspecting session history files with jq.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tool-integrations:agent-session-forensicsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Agent session ended mid-tool-call or cannot resume.
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.mdnpx claudepluginhub yeaight7/agent-powerups --plugin tool-integrationsGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
2plugins reuse this skill
First indexed Jul 28, 2026