Receber por email
← Voltar para o catálogo

Claude-Code-Agent-Monitor

Debug a specific session by inspecting its full event chain (PreToolUse, PostToolUse, Stop, SubagentStop, Compaction, APIError, TurnDuration, Notification events), agent hierarchy (recursive parent/child tree with subagent_type and depth), token usage with compaction baselines, workflow intelligence data (orchestration DAG, error propagation by depth), and session metadata (thinking_blocks, turn_c

478estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/claude-code-agent-monitor-mpsjmms2/svg)](https://www.skillteca.com.br/skills/claude-code-agent-monitor-mpsjmms2)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

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

  1. Identify the target session:
  2. If session ID given: GET /api/sessions/{id} from http://localhost:4820
  3. If "latest": GET /api/sessions?limit=1 (default sort: most recently updated first)
  4. If "errors": GET /api/sessions?limit=10&status=error
  1. Collect full session data:
  2. Session metadata: status, model, cwd, timestamps, duration
  3. Events: GET /api/events?session_id={session_id} — full event timeline
  4. Agents: GET /api/agents?session_id={session_id} — all agents in session
  5. Cost: GET /api/pricing/cost/{session_id}
  1. 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

### Event Chain Analysis

  • Chronological event list with timestamps and durations
  • Identify the critical path (longest chain of dependent events)
  • Flag events that took unusually long
  • Highlight error events with full error context

### Agent Inspection

  • List all agents: type, task, status, duration
  • Subagent tree visualization (parent → children)
  • Agents that failed and their last known state
  • Agent switching patterns (when and why new agents spawned)

### Tool Execution Trace

  • Every tool invocation in order with: tool name, duration, success/failure
  • Failed tool calls with error messages
  • Tool retry patterns (same tool called multiple times)

### Anomaly Detection

  • Events out of expected order
  • Gaps in event timeline (>30s with no events)
  • Duplicate events or agent states
  • Token usage spikes (compaction indicators)
  1. Diagnosis:
  2. Root cause hypothesis (if errors present)
  3. Contributing factors
  4. Remediation suggestions

Output Format

Present as a debug report with:

  • Session summary header (ID, status, model, duration, cost)
  • Color-coded timeline (✅ success, ❌ error, ⚠️ warning, ℹ️ info)
  • Agent tree diagram
  • Diagnosis section with numbered findings
Compartilhar X LinkedIn