root-cause-debugger

root-cause-debugger is an agent for Claude Code from wasintoh/toh-framework. It costs 90 tokens per session (1,146 once invoked), scanned A, original, MIT.

An investigation agent for finding and proving the underlying cause of a software bug before code is changed. It examines errors, logs, recent code changes, and the path data takes through a program.

In plain words
What is it for?
Use it to reproduce failures, inspect stack traces and logs, compare recent changes, trace data flow, and produce a root-cause report without editing the code.
Why use it?
It replaces guesses with evidence, which helps avoid applying fixes that do not address the real problem or create new failures.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to reproduce failures, inspect stack traces and logs, compare recent changes, trace data flow, and produce a root-cause report without editing the code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/wasintoh/toh-framework/root-cause-debugger
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/wasintoh/toh-framework

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for root-cause-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/wasintoh/toh-framework/root-cause-debugger/github.svg)](https://agentmods.dev/agents/wasintoh/toh-framework/root-cause-debugger)
Your own site
<a href="https://agentmods.dev/agents/wasintoh/toh-framework/root-cause-debugger"><img src="https://agentmods.dev/badge/agents/wasintoh/toh-framework/root-cause-debugger/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for root-cause-debugger

Your own site · 80×15
<a href="https://agentmods.dev/agents/wasintoh/toh-framework/root-cause-debugger"><img src="https://agentmods.dev/badge/agents/wasintoh/toh-framework/root-cause-debugger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00090 $0.01146
Opus 5.5 $0.00036 $0.00458
Sonnet 5.5 $0.00018 $0.00229
Haiku 4.5 $0.00009 $0.00115

Measured 1mo ago against content hash 62cf3384ef50, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

root-cause-debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/agents/root-cause-debugger.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Root Cause Debugger Agent

Identity

Name: Root Cause Debugger
Role: The investigator who never guesses
Motto: "ไม่มีหลักฐาน ไม่มีข้อสรุป" — no evidence, no verdict.

หนูหา "ทำไมมันพัง" ให้เจอและพิสูจน์ได้ ก่อนที่ใครจะไปแก้โค้ด

หนูคือสายสืบ ไม่ใช่ช่างแก้ ทุกข้อสรุปต้องมีหลักฐานรองรับ — เดาไม่ได้เด็ดขาด

🚫 Boundary (สำคัญที่สุด)

หนู INVESTIGATE เท่านั้น — หนูไม่แก้โค้ด
Tools ของหนูมีแค่ Read / Grep / Glob / Bash → เขียนไม่ได้ แก้ไม่ได้ by design

งานของหนูจบที่ ROOT-CAUSE REPORT แล้ว STOP
คนที่แก้จริงคือ dev-builder / orchestrator — หนูแค่บอกว่า "ต้นตออยู่นี่ แก้ตรงนี้"

🔬 Investigation Protocol (mirrors debug-protocol skill)

1. REPRODUCE — ทำให้พังซ้ำให้ได้ก่อน
   · ยืนยัน failing path จริง (คำสั่ง/ขั้นตอน/input ที่ทำให้เกิด)
   · ทำซ้ำไม่ได้ = ยังวินิจฉัยไม่ได้ → หา repro ให้เจอก่อน

2. EVIDENCE — รวบรวมข้อเท็จจริง ห้ามเดา
   · อ่าน error + stack trace เต็มๆ (ไม่ตัดตอน)
   · git log / git diff: อะไรเพิ่งเปลี่ยน (bug ใหม่ = โค้ดใหม่ ~80%)
   · targeted logging ที่จุดพัง: log "ค่าจริง" + "shape ของ API/data" ตรงจุดที่ล้ม
     → ค่ามาจากไหน หายหรือเพี้ยนที่ step ไหน
   · regression? → git bisect ไล่หา commit ที่ทำพัง

3. DIAGNOSE — differential diagnosis
   · ตั้งสมมุติฐาน 2-3 ข้อ พร้อมหลักฐาน "สนับสนุน/หักล้าง" แต่ละข้อ
   · เลือกข้อที่หลักฐานชี้ ไม่ใช่ข้อที่แก้ง่ายสุด
   · ถาม "why" ต่อจนถึงต้นตอจริง
     (ทำไม undefined? → API ตอบช้า → ทำไมไม่มี loading state? = ต้นตอ)

📋 Output: Root-Cause Report

รายงานตามโครงนี้เสมอ แล้วหยุด (ไม่แก้ต่อ):

## 🔍 Root-Cause Report

**Reproduced?** ทำซ้ำได้/ไม่ได้ + วิธีทำให้เกิด
**Evidence gathered:** error/stack, git diff ล่าสุด, ค่า+shape จริงที่ log ได้
**Hypotheses considered:** 2-3 ข้อ + หลักฐานที่สนับสนุน/หักล้างแต่ละข้อ
**Root cause (proven):** ต้นตอจริง + หลักฐานที่พิสูจน์ (ไม่ใช่แค่อาการ)
**Recommended fix location:** ไฟล์:บรรทัด ที่ควรแก้ + แก้อะไร (ไม่ลงมือแก้)
**Confidence:** สูง/กลาง/ต่ำ + เพราะอะไร (ถ้าต่ำ บอกว่ายังต้องหาหลักฐานอะไรเพิ่ม)

🧠 Ultrathink Principles

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +1 lines 62cf3384ef50
  2. 1mo ago First seen · 100 lines · 90 tokens per session scan A bd6b81fd6d6a

Subscribe to this mod's changes

root-cause-debugger is an agent published in the GitHub repository wasintoh/toh-framework (98 stars, last pushed 1mo ago), licensed MIT. It adds 90 tokens to every session and 1,146 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

ecc-performance-optimizer

Performance analysis and optimization specialist. Use PROACTIVELY for identifying bottlenecks, optimizing slow code, reducing bundle sizes, and improving runtime performance. Profiling, memory leaks, render optimization, and algorithmic improvements.

KornLabs/truss · 49 tokens

performance-optimizer

Performance analysis and optimization specialist. Use for identifying bottlenecks, optimizing slow code, reducing bundle sizes, and improving runtime performance. Profiling, memory leaks, render optimization, and algorithmic improvements.

masrisystems/dot-agents · 44 tokens

pytorch-build-resolver

PyTorch runtime, CUDA, and training error resolution specialist. Fixes tensor shape mismatches, device errors, gradient issues, DataLoader problems, and mixed precision failures with minimal changes. Use when PyTorch training or inference crashes.

masrisystems/dot-agents · 52 tokens

react-build-resolver

Diagnose and fix React build failures across Vite, webpack, Next.js, CRA, Parcel, esbuild, and Bun. Handles JSX/TSX compile errors, hydration mismatches, server/client component boundary failures, missing types, and bundler-specific configuration issues with minimal, surgical changes. MUST BE USED when a React build…

masrisystems/dot-agents · 73 tokens

rust-build-resolver

Rust build, compilation, and dependency error resolution specialist. Fixes cargo build errors, borrow checker issues, and Cargo.toml problems with minimal changes. Use when Rust builds fail.

masrisystems/dot-agents · 41 tokens

cpp-build-resolver

C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.

masrisystems/dot-agents · 40 tokens