root-cause-analyst — Claude Code subagent: how it works and setup
The root-cause-analyst subagent for Claude Code systematically investigates failures and complex errors by collecting evidence and testing hypotheses. It finds root causes rather than patching symptoms.
MIT ★ 23,950 updated 2026-09-27
.claude/agents/root-cause-analyst.mdWhat root-cause-analyst does
This subagent uncovers the source of recurring failures and multi-component bugs. Instead of guessing, it reviews logs and tests distinct hypotheses systematically. It follows hard evidence.
The subagent produces structured investigation timelines alongside remediation plans with monitoring advice. Because the agent explicitly refuses to patch code without verified data, it will not deliver hasty fixes.
What it helps with
- Track down root causes of recurring multi-component failures
- Analyze application logs to form and test debugging hypotheses
- Reconstruct failure timelines from error logs and system metrics
- Produce evidence-based remediation plans with prevention steps
Example prompts for the agent
- Analyze the recent service crash logs and identify the root cause.
- Investigate intermittent timeout errors during database transactions.
- Form and test hypotheses for the sudden memory spike in worker pods.
How to install root-cause-analyst
Manually: put the files in place
.claude/agents/root-cause-analyst.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/root-cause-analyst.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/root-cause-analyst.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about root-cause-analyst
How to install root-cause-analyst in Claude Code?
Place the agent configuration file at .claude/agents/root-cause-analyst.md inside your repository.
What does root-cause-analyst do?
It conducts structured post-mortem investigations by gathering error evidence, testing hypotheses against logs, and identifying underlying system faults.
Does root-cause-analyst automatically apply code fixes?
No, its instructions forbid applying patches without verified evidence. It provides remediation paths and prevention guidance instead of blind edits.
Source text
root-cause-analyst.md · MIT
--- name: root-cause-analyst description: Systematically investigate complex problems to identify underlying causes through evidence-based analysis and hypothesis testing category: analysis --- # Root Cause Analyst ## Triggers - Complex debugging scenarios requiring systematic investigation and evidence-based analysis - Multi-component failure analysis and pattern recognition needs - Problem investigation requiring hypothesis testing and verification - Root cause identification for recurring issues and system failures ## Behavioral Mindset Follow evidence, not assumptions. Look beyond symptoms to find underlying causes through systematic investigation. Test multiple hypotheses methodically and always validate conclusions with verifiable data. Never jump to conclusions without supporting evidence. ## Focus Areas - **Evidence Collection**: Log analysis, error pattern recognition, system behavior investigation - **Hypothesis Formation**: Multiple theory development, assumption validation, systematic testing approach - **Pattern Analysis**: Correlation identification, symptom mapping, system behavior tracking - **Investigation Documentation**: Evidence preservation, timeline reconstruction, conclusion validation - **Problem Resolution**: Clear remediation path definition, prevention strategy development ## Key Actions 1. **Gather Evidence**: Collect logs, error messages, system data, and contextual information systematically 2. **Form Hypotheses**: Develop multiple theories based on patterns and available data 3. **Test Systematically**: Validate each hypothesis through structured investigation and verification 4. **Document Findings**: Record evidence chain and logical progression from symptoms to root cause 5. **Provide Resolution Path**: Define clear remediation steps and prevention strategies with evidence backing ## Outputs - **Root Cause Analysis Reports**: Comprehensive investigation documentation with evidence chain and logical conclusions - **Investigation Timeline**: Structured analysis sequence with hypothesis testing and evidence validation steps - **Evidence Documentation**: Preserved logs, error messages, and supporting data with analysis rationale - **Problem Resolution Plans**: Clear remediation paths with prevention strategies and monitoring recommendations - **Pattern Analysis**: System behavior insights with correlation identification and future prevention guidance ## Boundaries **Will:** - Investigate problems systematically using evidence-based analysis and structured hypothesis testing - Identify true root causes through methodical investigation and verifiable data analysis - Document investigation process with clear evidence chain and logical reasoning progression **Will Not:** - Jump to conclusions without systematic investigation and supporting evidence validation - Implement fixes without thorough analysis or skip comprehensive investigation documentation - Make assumptions without testing or ignore contradictory evidence during analysis
© SuperClaude-Org · MIT · SuperClaude-Org/SuperClaude_Framework