| name | errors |
| license | MIT |
| compatibility | Claude Code 2.1.220+. Requires memory MCP server. |
| description | Error pattern analysis and troubleshooting for Claude Code sessions. Categorizes errors (network, auth, model, tool, memory, permission) with known resolution patterns, searches memory for prior occurrences, and suggests recovery steps. Delegates to debug-investigator agent for complex root cause analysis. Use when handling errors, fixing failures, or troubleshooting session issues. |
| context | inherit |
| agent | debug-investigator |
| version | 1.0.0 |
| author | OrchestKit |
| tags | ["errors","debugging","troubleshooting","patterns"] |
| user-invocable | false |
| allowed-tools | ["Read","Bash","Grep"] |
| complexity | low |
| persuasion-type | collaborative |
| effort | low |
| model | haiku |
| metadata | {"category":"document-asset-creation","mcp-server":"memory"} |
Error Pattern Analysis
Analyze errors captured from Claude Code sessions to identify patterns and get actionable insights.
Quick Start
/errors
/debug
When to Use Which
| Command | Purpose | Scope |
|---|
/errors | Batch analysis of error patterns (last 24h/7d) | Historical patterns |
/debug | Real-time debug of current session state | Current session |
/ork:fix-issue | Full RCA workflow for specific bug | Single issue |
CC 2.1.169+: for errors that survive /clear and restarts, claude --safe-mode boots with every customization disabled (CLAUDE.md/plugins/skills/hooks/MCP) — the one-step test that separates "ork/hook/MCP bug" from "CC bug" before deeper analysis.
Quick Analysis
python .claude/scripts/analyze_errors.py
python .claude/scripts/analyze_errors.py --days 7
python .claude/scripts/analyze_errors.py --report
What Gets Captured
The error collector hook captures:
- Tool name (Bash, mcp__memory__search_nodes, etc.)
- Error message (first 500 chars)
- Tool input (command/query that failed)
- Timestamp and session ID
Location: .claude/logs/errors.jsonl
Current Error Rules
Check learned patterns that trigger warnings:
cat .claude/rules/error_rules.json | jq '.rules[] | {id, signature, count: .occurrence_count}'
Files
| File | Purpose |
|---|
.claude/hooks/posttool/error-collector.sh |