
Session Debug
When your Claude Code session goes sideways and you need to understand what actually happened, this pulls the full event chain from Agent Monitor's API and lays it out chronologically. You get the agent hierarchy tree, every tool call with timing, token usage spikes, and gaps in the timeline that suggest something stalled. It highlights errors in context, traces the critical path through events, and spots anomalies like duplicate states or unexpected event ordering. The diagnosis section attempts root cause analysis, which is hit or miss, but having the raw timeline with PreToolUse, PostToolUse, and SubagentStop events in one view beats manually correlating logs. Best used right after a session errors out or when you're debugging why something took forever.
- GitHub stars
- 455
- last updated
- Jun 11, 2026
Install
$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill session-debug --agent claude-codeInstalls into .claude/skills of the current project.
Files
Session Debug
Debug and inspect a Claude Code session from Agent Monitor data.
Input
The user provides: $ARGUMENTS
This may be:
- A session ID to debug
- "latest" or "last" for the most recent session
- "errors" to find and debug the most recent errored session
Procedure
-
Identify the target session:
- If session ID given:
GET /api/sessions/{id}fromhttp://localhost:4820 - If "latest":
GET /api/sessions?limit=1(default sort: most recently updated first) - If "errors":
GET /api/sessions?limit=10&status=error
- If session ID given:
-
Collect full session data:
- Session metadata: status, model, cwd, timestamps, duration
- Events:
GET /api/events?session_id={session_id}— full event timeline - Agents:
GET /api/agents?session_id={session_id}— all agents in session - Cost:
GET /api/pricing/cost/{session_id}
-
Analyze the session:
Session Lifecycle
- Start time → first event → last event → end time
- Status transitions (active → working → completed/error)
- Total duration and active-vs-idle time
Sponsors
Details
- Repository
- github.com/hoangsonww/claude-code-agent-monitor
- Categories
- DevOps & CI/CD, AI & Agent Building, Debugging
- License
- MIT
- First seen
- Jun 11, 2026
More from hoangsonww/claude-code-agent-monitor
All 24- Session Report
- Ship Feature
- Sprint Summary
- Usage Trends
- Weekly Report
- Workflow Optimizer
- Anomaly Alert
- Cost Breakdown
- Daily Standup
- Dashboard Status
- Data Export
- Debug Live Issue
- Health Check
- Hook Diagnostics
- Mcp Maintainer
- Mcp Operations
- Optimization Suggest
- Pattern Detect
- Productivity Score
- Quick Stats
- Release Guard
- Repo Onboarding
- Session Compare