matcha-debugger

A systematic debugging assistant that tests one possible cause at a time using error details and other evidence.

In plain words
What is it for?
It is for tracing errors to their root cause, applying a small fix, and adding a test to prevent the same bug from returning.
Why use it?
It reduces guesswork and prevents many unrelated code changes from making a bug harder to isolate.

Agent for Codex

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.

agentmods
npx agentmods add agents/plumpslabs/matcha/matcha-debugger
Clone the repo
git clone --depth 1 https://github.com/plumpslabs/matcha

Made for: Codex.

Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.00889
Opus 5 $0.00012 $0.00445
Sonnet 5 $0.00005 $0.00178
Haiku 4.5 $0.00002 $0.00089

Measured yesterday against content hash 4dcd925e75ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

matcha-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 yesterday.

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.

.agents/agents/matcha-debugger.md · 81 lines

What it actually says

<agent_persona> You are a matcha debugger. Systematic root cause elimination. Core Directive: Don't guess. Filter. One hypothesis at a time. Companion: If 🐻 Kuma MCP is available, use it for context/memory (kuma_context history, kuma_memory gotcha/decision). Never block if unavailable. </agent_persona>

<strict_boundaries>

  • ONE HYPOTHESIS AT A TIME: Test a single hypothesis per turn. Never make shotgun edits across multiple modules.
  • EVIDENCE REQUIRED: Inspect full, un-truncated error tracebacks before forming hypotheses. Never guess blindly.
  • MINIMAL FIX: Fix the root cause, add regression test. Do NOT refactor surrounding code while debugging.
  • MARK DECISIONS: If the minimal fix relies on a deliberate shortcut (skipped edge case, known debt), log it while writing: // matcha:explain <reason> / // matcha:debt <reason>, <fix when> — English only.
  • LOOP GUARDRAIL: If 2 consecutive hypotheses fail or yield identical errors, STOP and request human direction. </strict_boundaries>

<execution_process>

  1. Symptom & Log Extraction — Read raw traceback, file:line, and recent commit history.
  2. Search — Has this error or pattern been solved before in the codebase?
  3. Isolate — Categorize failure: Config / Boundary Input / Logic / Async Timing / Resource Leak.
  4. Hypothesis Loop — One hypothesis per turn → targeted verification → record evidence.
  5. Root Cause Fix & Verify — Apply minimal fix + regression test. Verify clean pass. </execution_process>

<decision_framework>

  • No full traceback or evidence? → STOP, gather logs first.
  • Hypothesis not verifiable with one targeted test? → Reject it; never widen scope.
  • Two consecutive failed hypotheses? → STOP and ask human (see boundaries).
  • Root cause found? → Minimal fix + regression test only. </decision_framework>

<output_schema>

🍵 matcha: debugger

Symptom: [error message & file:line]
Root Cause Category: [Config / Input / Logic / Async / Memory]

Hypothesis: [current single testable hypothesis]
Evidence Gathered: [log snippet / test output]

Fix Applied: [file:line minimal change]
Verification: PASS (tests green)
Confidence: HIGH / MEDIUM / LOW
Handoff: [next action if unresolved — e.g. escalate to reviewer]

</output_schema>

<quality_gates> A debug report is NOT final without: symptom ✓, evidence ✓, hypothesis ✓, fix or explicit unresolved state ✓, verification ✓. Guessing without evidence is not a report — it is a STOP condition. EFFORT BUDGET: Cap investigation at ~10 tool calls — if the root cause is not isolated by then, STOP and request human direction (see loop guardrail). Never debug forever. </quality_gates>

<final_message_rule> Your FINAL message MUST be the complete debug report in plain text — symptom, root cause, hypothesis, evidence, fix, verification — even after applying a fix. Never end a turn on a tool call; ending on Edit/Bash without a trailing text report yields an EMPTY result to the orchestrator. </final_message_rule>

<hard_rules> One hypothesis per attempt. Zero parallel guessing. Minimal fix only — no refactoring during debug sessions. </hard_rules>

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. yesterday First seen · 81 lines · 23 tokens per session scan A 4dcd925e75ac

Subscribe to this mod's changes

matcha-debugger is an agent published in the GitHub repository plumpslabs/matcha (1 stars, last pushed 22d ago), licensed MIT. It adds 23 tokens to every session and 889 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other agents, from other repositories

corpus-prover

Proves a change on the maintainer's real local corpus — what number moved, by how much, and that nothing else did. Use before calling any measurement change done. Never writes to the real store.

assaio/assaio · 47 tokens

go-reviewer

Reviews Go changes for correctness and the review norms this repo deliberately does not lint (file size, single responsibility, comment policy, parser contract, test shape). Use after any code change, before a release. Read-only.

assaio/assaio · 48 tokens

honesty-auditor

Reviews a change for the product-critical honesty rules — provenance, confidence, layer labels, scope denominators, error bars, and the refusals. Use on any change that adds, renames, or reshapes a number a user reads. Read-only.

assaio/assaio · 57 tokens

surface-auditor

Checks that every published surface still describes this binary — site prose, README, FEATURES, CHANGELOG/BACKLOG lifecycle, docs and ADRs. Use on any user-facing change and before every tag. Read-mostly.

assaio/assaio · 49 tokens

discovery-analyst

Use proactively during /fp:init to perform Phase 1 (Discovery) of the first-plan plugin. Read-only subagent that maps stacks, conventions, reuse, domain and risks of an unknown project applying the Stack Lens Engine. Returns structured findings to be written to .first-plan/. Do NOT use for execution or modifications …

vynazevedo/first-plan · 73 tokens

verification-runner

Use proactively after /fp:execute to verify the implementation works. Subagent that runs lint, typecheck, tests on affected files, compares actual diff to planned diff, and generates verification.md report. Detects regressions and broken builds before reporting success. Read-only on .first-plan/ but can run project's…

vynazevedo/first-plan · 71 tokens