codeloop_diagnose
Classify failures from a verify run into structured issues with severity, evidence, root cause, and concrete repair tasks.
When to use codeloop_diagnose
When verify reports failures. Returns categorised issues + concrete repair tasks the agent should fix before re-verifying.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| run_id | string | yes | The run_id returned by codeloop_verify. |
| focus_files | array | no | Optional list of file paths to constrain the analysis to. |
| project_dir | string | no | Absolute path to the project root. |
What you get back
Categorised issues with severity (blocker / critical / warning / info), evidence, and repair tasks.
Typical prompts that trigger it
Cursor + Claude Code call codeloop_diagnose automatically when your prompt looks like one of these:
- “Why did the verify fail?”
- “Diagnose the test errors and propose fixes.”
FAQ
What does codeloop_diagnose do?
Classify failures from a verify run into structured issues with severity, evidence, root cause, and concrete repair tasks.
When should an AI agent call codeloop_diagnose?
When verify reports failures. Returns categorised issues + concrete repair tasks the agent should fix before re-verifying.
What does codeloop_diagnose return?
Categorised issues with severity (blocker / critical / warning / info), evidence, and repair tasks.
Is codeloop_diagnose part of the CodeLoop MCP server?
Yes. CodeLoop ships as an MCP server installed via `npx codeloop init`. Cursor and Claude Code call it automatically once the User Rule (Cursor) or CLAUDE.md (Claude Code) is in place.