Skip to main content
subagent CX Codex

diagnoser — Claude Code subagent: diagnosis and install

diagnoser is a Claude Code subagent that examines output from a failed test, build, or lint run. It identifies a likely cause and returns evidence pointers with a fix plan.

MIT ★ 80 updated 2026-11-17

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/diagnoser.md
Open on GitHub

What diagnoser does

diagnoser traces a failed check from its output to the relevant code. It classifies the cause as a defect, an environment problem, a flaky check, or unknown. The main session gets a compact report rather than the full log.

It is read-only and can use Read, Grep, and Glob; it does not modify code. The report includes file-and-line references, short log excerpts, and a proposed fix plan. If the investigation is incomplete, it marks the report accordingly and lists unchecked areas. Haiku is the default model; Sonnet is used for tasks carrying risk.

What it helps with

  • trace a failed test to the code behind it
  • locate the cause of a build failure from its output
  • separate environment problems from flaky checks
  • get a fix plan without changing project files

Example prompts for the agent

  • Trace this failed test output to its cause and cite the relevant lines.
  • Find why the build failed and give me a fix plan without editing files.
  • Classify this lint failure as a code defect or an environment issue; list anything you could not check.

How to install diagnoser

Manually: put the files in place

.claude/agents/diagnoser.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about diagnoser

How do I install diagnoser in Claude Code?

Save the subagent file at .claude/agents/diagnoser.md.

What does diagnoser do?

It investigates output from failed tests, builds, and lint runs, then reports a likely cause with evidence pointers and a fix plan. It does not change files.

Which tools can diagnoser use?

It has read-only access through Read, Grep, and Glob. Sonnet is used instead of Haiku for tasks that carry risk.

Source text

diagnoser.md · MIT
---
name: diagnoser
description: AutoMode diagnoser (Haiku, or Sonnet when the task carries risk). Read-only diagnosis of a failing test, build or lint run from its output. Finds the cause and returns a compact report with evidence pointers and a fix plan, so long logs stay out of the main session. Changes nothing.
tools: Read, Grep, Glob
model: haiku
maxTurns: 20
color: orange
---

You are the AutoMode diagnoser. You find why a check failed. You do not fix it.

Rules:
- Read only. You have Read, Grep and Glob, nothing else.
- Start from the failing output in the prompt. Read only the lines the stack trace, the assertion or the error points to, then the code they call.
- Decide the category: `defect` (the code or a test is wrong), `environment` (a missing tool, module, network, credential, permission, or service), `flaky` (timing or ordering), or `unknown`.
- Evidence is `path:line` pointers and short log lines, never whole files.
- If you stop before you are sure, say so: set `"complete": false` and list what you did not check in `omitted`.
- Return only the JSON report the prompt asks for.

© mralexivy · MIT · mralexivy/AutoMode

Similar subagents

Subagents catalog →

From the same set10

The whole set →
explorer The explorer subagent for Claude Code gathers repository facts for a planner. It identifies dependencies, build commands, and tests before task planning begins. CX Codex ★ 80repo stars implementer implementer is a Claude Code subagent that carries out one workstream from an approved plan. It edits its assigned files, adds tests, and runs validation. CX Codex ★ 80repo stars builder builder is a Claude Code subagent that takes a standalone task brief, edits the working tree, and loops through project checks until they pass. Runs for rescue attempts and dedicated build tasks. CX Codex ★ 80repo stars verifier verifier is a Claude Code subagent that runs tests, type checks, and builds after code changes. It reviews the diff for regressions and repairs defects caused by the current work. CX Codex ★ 80repo stars reviewer The reviewer subagent for Claude Code performs an independent audit of code changes. It evaluates completed work against original task requirements and acceptance criteria, identifying critical issues. CX Codex ★ 80repo stars architect architect is a Claude Code subagent that turns discovery summaries into an architecture plan. It assigns file ownership and defines acceptance checks. CX Codex ★ 80repo stars growth growth is a Claude Code skill for AutoMode’s weekly promotion cycle. Ask it to draft social posts, check catalogue submissions, find listings, or report traffic and stars. CX Codex +1 ★ 80repo stars publish-results publish-results is a Claude Code skill that propagates benchmark figures across project docs and site files. Runs before merging release PRs or after altering public metrics. CX Codex +1 ★ 80repo stars

Project sponsors

Companies that keep this analytics open