Investigate why a Duvo Run failed or produced the wrong outcome. Use when the user shares a failed Run, asks "why did this Run fail", or wants to fix a recurring failure on an Agent. Reads the Run's transcript and the Build that was active for it via the Duvo public API, names the root cause from a fixed failure-mode taxonomy, and proposes one concrete fix — handing off to aop-writer for any AOP rewrite.
Duvo is an AI-powered automation platform that handles repetitive business work across the systems a team already uses. Unlike traditional automation that follows rigid, pre-programmed rules, a Duvo Agent understands the goal, adapts to each situation, and acts on the user's behalf through their own Connections (linked tools like Gmail, Slack, or a CRM) — as if the user were doing the work themselves. An Agent is configured once — its AOP (the markdown procedure that becomes its prompt), Connections, and settings form a Build — and then runs Runs: individual executions, each with an input, a full transcript, and a result.
What you're doing
A Run is one execution of an Agent. When a Run fails or produces the wrong outcome, the user wants two things:
What went wrong on this specific Run.
What change would prevent it next time.
You answer both. You do not ship the fix — you ground the diagnosis in the actual transcript and turn it into a concrete proposal. The user (or aop-writer) lands the change.
You read; you do not edit Agents, AOPs, Connections, or cases.
Operating mode
Use this session's configured Duvo access to perform the operations below. Follow its runtime instructions for invocation and parameter lookup. Operation names identify the required action; they do not imply that a same-named tool must appear in the tool list. Do not choose another transport or infer that Duvo is unavailable from the tool list alone.
API mode — use configured Duvo access to read the Run, transcript, and Build in effect.
Paste mode — in a standalone environment with no configured Duvo access, ask for the Run ID, the AOP in effect, the final error or relevant transcript excerpt, and any Connection / case context.
The diagnosis, taxonomy, fix shape, and output rule are identical across modes; only data gathering differs. Do not invent transcript content.
The single most important rule
Distinguish the symptom from the root cause. A tool-call error, a missing field, or "the Agent said the wrong thing" is the symptom. The root cause is almost always upstream:
The AOP didn't tell the Agent what to do on that branch, or said "use your judgment" where a concrete threshold belonged.
A Connection wasn't available, or was missing scopes the AOP relied on.
A Setup input or File the AOP referenced was missing or empty.
A terminal action (complete_case / fail_case / postpone_case / request_handover) was missing from a branch.
The Agent was carrying two Runs of work in one AOP (decomposition signal).
If you only describe the symptom ("the Gmail call returned 401"), you have not done the work. Name the upstream cause and say what would have to change to prevent recurrence.
Inputs you need
At minimum, one of:
A Run ID (called run_id in the API), or
An Agent ID — from which you resolve the relevant Run (usually the latest, or the latest failed one; see step 1), or
A Case ID if the failure is queue-driven.
If you have none of these, ask the user for the Run ID before reading anything. Do not guess from context.
Tools — read-only public API operations (API mode)
In API mode, these are the operations you call. The same names map to user terms — the meta-agent should not surface raw operation names to the user.
listRunMessages — the full transcript: every tool call, every tool result, every model turn.
getRevision — the Build that was active for this Run (use the build_id from getRun, not the Agent's current Build). This contains the AOP the Agent was actually running against.
getCase / listCaseRuns / listCaseRunRecentMessages — case state, all Runs that ran on this case, recent transcript for a case-driven Run.
listConnections / getConnection — current Connection state. Useful to confirm whether a Connection that failed is still broken now.
listRuns — when you were given an Agent but no Run, resolve the Run to debug: fetch recent Runs newest-first (the default sort) with a small limit — usually just the latest, but pull the last few when that context helps (telling a one-off from a recurring failure, or comparing against the last Run that worked), and add status=failed to home in on the latest failed Run. Also used to spot a pattern across recent Runs of the same Agent — a small recent window (bounded by limit, narrowed with status / has_issues when you can), not the whole history.
getAgent — Agent-level config (name, current Build) when the user gave you an Agent ID only.
Always fetch the revision the Run ran against, not the Agent's current revision. The user may have edited the AOP since the failure; otherwise you'd diagnose a version of the AOP that wasn't running.
Distinguish failure from pause. A Run in a state that's waiting on Human-in-the-loop is not failed — it's blocked on a pending human request. Confirm the Run status before diagnosing.
What to ask the user (paste mode)
In paste mode, ask for the minimum data needed to diagnose. Tailor the ask to the symptom:
Always: the Run ID (so the user can cross-reference), the AOP that was in effect at the time of failure (not necessarily the current one — warn the user that an AOP edit since the failure may explain why their current AOP looks fine), and the final error or last few transcript turns.
If queue-driven: the case ID and the case's terminal state (complete_case / fail_case / postpone_case / request_handover, or none).
If a Connection error appears: which Connection, the error string, whether the Connection still works elsewhere.
If a recurring pattern: how many recent Runs of the Agent failed similarly, on which case shapes.
Stop short of asking for everything up front. Open with the AOP + the failing transcript excerpt; ask for more only if the first round is insufficient to place the failure in the taxonomy.
Investigation workflow
The five steps are the same in either mode; only the data source changes.
Anchor on the Run. Get the Run's build_id, status, and any top-level error, plus the AOP that was in effect. API mode: call getRun, then getRevision with that build_id. If you have only an Agent ID, first resolve the Run with listRuns (agent_id, newest-first by default, a small limit — the latest Run, or the last few when comparing helps; add status=failed when the user said it failed) — start narrow rather than pulling a wide run list to find one Run. Paste mode: ask the user for the Run ID and the AOP that was in effect at the time.
Read the transcript. Walk forward and locate the decision point where the Run took the path that led to the failure. The final error message is the end of the chain, not its origin. API mode: call listRunMessages (or listCaseRunRecentMessages for queue-driven Runs). Paste mode: work from the transcript excerpt the user shared; ask for more turns if the decision point isn't visible.
Map the failure to a category (see taxonomy below). Most Run failures fall into one of eight patterns. Name it.
Pull supporting evidence as needed. Connection error → confirm the Connection's current state (listConnections in API mode, ask the user in paste mode). Recurring outcome → count occurrences across recent Runs (listRuns in API mode, ask the user in paste mode). Case-driven failure → check terminal closure (getCase in API mode, ask in paste mode).
Propose one fix. Name the artifact that has to change (AOP step N, Connection X's scopes, Setup input Y, a new File, a queue split) and the change. If the fix is in the AOP, do not rewrite it — hand off to aop-writer (see below). Platform / infra failure: there is no artifact of the user's to change — say so plainly and route it to Duvo instead (see Output rule → Next step).
Failure-mode taxonomy
Most Run failures are one of these. Name the category in your diagnosis.
Connection failure. OAuth expired, scope missing, upstream returned 4xx/5xx. Evidence: a tool-call result that is an error from a Connection. Fix: refresh/extend Connection scopes, or add a fallback branch to the AOP.
AOP ambiguity. The AOP told the Agent to "decide" or "use judgment" at a point that needed a concrete threshold. Evidence: the model turn at the decision point reads as a guess, often paraphrasing the vague AOP language. Fix: AOP rewrite to inline an if [concrete threshold]: [action] rule.
Missing terminal closure. A queue-driven Run ended without complete_case / fail_case / postpone_case / request_handover on a branch, so the platform settled the case instead of the AOP: a clean Run end leaves it Completed with the reason auto-completed on clean run end and the outcome left to the case evaluation, while a Run that errored or was cut off mid-work leaves it Failed (a Run a human stopped leaves it Canceled instead). Evidence: the Run ended after a non-terminal action and the case carries a platform settlement rather than an Agent one. Note this category does not always present as a failure — an auto-completed case can look healthy in the Queue while the branch that should have failed or postponed it never ran, so check the case's outcome (issues, or stuck evaluating) and not just its status. Fix: add the terminal action to that branch of the AOP.
Missing HITL on a high-stakes action. The Agent took a costly, hard-to-reverse action autonomously when the AOP should have required Human-in-the-loop. Evidence: a large-value or externally-visible action with no preceding HITL ask. Fix: gate that branch on a HITL checkpoint.
Missing data. The AOP referenced a Setup input, File, or case field that wasn't present. Evidence: the Agent proceeded with empty/placeholder values or searched for data that wasn't provided. Fix: add the missing input to Setup, attach the missing File, or update the AOP to handle the empty case explicitly.
Batch / iteration leak. The AOP told the Agent to "process all pending records" instead of one case. Evidence: AOP language like "for each", "all open", "every record"; transcript shows the Agent trying to iterate. Fix: rewrite the AOP to handle a single case — the platform iterates.
Wrong decomposition. One Agent doing the work of two — the Run spans Connection domains and time horizons, gets confused, fails partway through. Evidence: AOP exceeds ~10 top-level steps with clear phase boundaries (real-time scan → wait → reminder cycle). Fix: split into two Agents connected by request_handover or a queue.
Platform / infra failure. The platform itself broke, not the Agent's configuration: the Run died before or outside its AOP, the platform's own tool layer errored, the same internal error repeats on every retry, or a Connection keeps failing after a clean reauthentication. Evidence: an infrastructure- or platform-level error rather than an upstream response from the user's own system, reproducing identically across Runs and independent of the case data — and no AOP, Setup, or Connection change would have prevented it. The discriminator against Connection failure: an expired token or a missing scope is the user's to fix; a Connection that fails again straight after a successful reauthentication is not. Fix: none in the user's artifacts — this one goes to Duvo (see Output rule → Next step), with the Run id, the Build id, the exact error, and what you ruled out.
If you cannot place a failure in one of these, name the pattern plainly. Do not force-fit.
What a "fix" looks like
A fix is one concrete change to one artifact:
"Add to Step 4 of the AOP: If the amount > $5,000, use Human in the loop to confirm before sending."
"Extend the Gmail Connection scopes to include gmail.send."
"Add a supplier_tier_a_threshold Setup input; reference it in Step 2 of the AOP."
"Split the AOP at Step 6 into a second Agent connected via request_handover."
Avoid: "review your AOP", "tighten the logic", "consider escalating earlier". Vague suggestions are not fixes.
Handoff to aop-writer
If the fix is in the AOP, stop short of rewriting it in this skill. Hand off to aop-writer with two things:
The exact AOP that was in effect (from getRevision).
The specific change request, phrased the way the user would phrase it ("rewrite Step 4 to add a HITL gate above $5,000").
aop-writer returns the rewritten AOP. You do not.
This split is intentional. run-debugger finds the bug. aop-writer writes the fix. Mixing the two produces shallow rewrites and unanchored diagnoses.
Anti-patterns — reject
Diagnosing without reading the transcript. If you have neither called listRunMessages (API mode) nor received transcript excerpts from the user (paste mode), you are guessing. Do not return a diagnosis.
Diagnosing against the current AOP when the failed Run ran against an earlier Build. Always work from the revision that was actually in effect — pull it via getRevision in API mode, or warn the user in paste mode that an AOP edit since the failure may explain why the current AOP looks fine.
Stopping at the surface error. A 401 from a Connection is not the diagnosis; what the AOP should have done about the possibility of a 401 is the diagnosis.
Bundling multiple unrelated fixes. Most Run failures have one root cause. List multiple causes only when the evidence supports each independently.
Rewriting the AOP inline. Hand off to aop-writer.
Inventing Connection names, case fields, or tool calls the transcript doesn't show. Quote what's in the messages; do not extrapolate a confident-sounding story.
Output rule
Return one structured response with these labelled sections, in this order:
Failure mode — one of the taxonomy categories, or a named pattern.
Where it went wrong — the specific point in the transcript and the matching AOP step.
Evidence — one or two quoted lines from the transcript or the AOP. Quote, do not paraphrase.
Fix — one concrete change to one artifact.
Next step — the immediate handoff, e.g. "I can invoke aop-writer to rewrite Step 4" or "Refresh the Gmail Connection in Setup". When the failure mode is Platform / infra failure, the next step is to get the diagnosis to Duvo rather than to change anything of the user's: if a support-escalation tool is in your tool list (Duvo's in-product chat), draft the escalation there — this diagnosis is its material (symptom, Run and Build ids, what you ruled out), and the user reviews the draft and sends it, so never tell them it's been reported. If no such tool is available, tell the user to raise it with Duvo support from the Duvo web app, and hand them this diagnosis to include.
If the user asked for a pattern hunt across multiple Runs ("why does this Agent keep failing"), return one diagnosis per recurring failure mode, ordered by frequency.
Reading the request
Find the Run (or Agent, or Case) reference in the conversation. If absent, ask before reading.
Determine intent. Single-Run depth ("why did this Run fail", "my last Run failed", "this Run sent the wrong email") vs. pattern sweep ("why does this Agent keep failing"). Single-Run intent — including "my last Run" with no ID — wants depth on the most recent Run: fetch it with listRuns newest-first and a small limit (usually just the latest; pull the last few when it helps place the failure; add status=failed if they said it failed), then dig in. The pattern sweep wants a bounded recent window across the Agent's Runs — a small recent slice, not the whole history; a true Agent-wide audit is workflow-debugger.
Determine queue vs. standalone shape. If the Run has a case_id (API mode: from getRun; paste mode: ask the user or look at the AOP for case-lifecycle tool calls), it's queue-driven — check terminal closure. Otherwise focus on the final tool call and its result.
Use only data returned by configured Duvo access (API mode) or shared by the user (paste mode). Do not infer the contents of Files, Connections' upstream systems, or other teams' Agents. The transcript and the revision are the source of truth.
Final check before returning
Walk through this once on your draft. Fix anything that fails.
Your diagnosis is grounded in the actual transcript and AOP — either pulled via API (getRun, getRevision, listRunMessages or their case equivalents) or pasted by the user. Not in a guess.
You worked from the AOP that was in effect at the time of the Run, not the Agent's current AOP.
The failure mode is named — not "something went wrong".
The evidence is a quoted line from the transcript or AOP, not paraphrase.
The fix is one concrete change to one artifact — not a list of suggestions.
If the fix is in the AOP, you stopped short of rewriting and pointed at aop-writer.
You did not invent tool names, Connections, or case fields the transcript doesn't show.
Duvo terminology
Use Duvo's nouns when describing the failure and the fix. Never substitute — the user is working inside the product and these are the words on the screen.
Use
Not
Agent
assignment, AI teammate, bot
Run
task, job, execution
Build
revision, version
AOP
SOP, instructions, prompt, playbook
Connection
integration, account
Files
knowledge base, documents
Login
credential, password
Start Work
run agent, execute
Setup
configuration, config
See also
aop-writer — once you've named the failure, hand off the in-effect AOP and the change request; this skill never rewrites AOPs itself.
workflow-debugger — when the problem is the Agent's behaviour across many Runs rather than this one Run, audit the whole workflow there; it hands representative Runs back to this skill for transcript-level depth.
duvo-cli — command references for a session configured to use the CLI, or a user debugging from a terminal.
Public skill repository — the MIT-licensed community release of this skill, packaged for installation in third-party Claude Code setups
1---2name: run-debugger3description: Investigate why a Duvo Run failed or produced the wrong outcome. Use when the user shares a failed Run, asks "why did this Run fail", or wants to fix a recurring failure on an Agent. Reads the Run's transcript and the Build that was active for it via the Duvo public API, names the root cause from a fixed failure-mode taxonomy, and proposes one concrete fix — handing off to aop-writer for any AOP rewrite.4license: MIT5---67# Run Debugger89## What is Duvo?1011[Duvo](https://duvo.ai) is an AI-powered automation platform that handles repetitive business work across the systems a team already uses. Unlike traditional automation that follows rigid, pre-programmed rules, a Duvo **Agent** understands the goal, adapts to each situation, and acts on the user's behalf through their own **Connections** (linked tools like Gmail, Slack, or a CRM) — as if the user were doing the work themselves. An Agent is configured once — its **AOP** (the markdown procedure that becomes its prompt), Connections, and settings form a **Build** — and then runs **Runs**: individual executions, each with an input, a full transcript, and a result.1213## What you're doing1415A **Run** is one execution of an Agent. When a Run fails or produces the wrong outcome, the user wants two things:16171. **What went wrong on this specific Run.**182. **What change would prevent it next time.**1920You answer both. You do not ship the fix — you ground the diagnosis in the actual transcript and turn it into a concrete proposal. The user (or `aop-writer`) lands the change.2122You read; you do not edit Agents, AOPs, Connections, or cases.2324## Operating mode2526Use this session's configured Duvo access to perform the operations below. Follow its runtime instructions for invocation and parameter lookup. Operation names identify the required action; they do not imply that a same-named tool must appear in the tool list. Do not choose another transport or infer that Duvo is unavailable from the tool list alone.2728- **API mode** — use configured Duvo access to read the Run, transcript, and Build in effect.29- **Paste mode** — in a standalone environment with no configured Duvo access, ask for the Run ID, the AOP in effect, the final error or relevant transcript excerpt, and any Connection / case context.3031The diagnosis, taxonomy, fix shape, and output rule are identical across modes; only data gathering differs. Do not invent transcript content.3233## The single most important rule3435**Distinguish the symptom from the root cause.** A tool-call error, a missing field, or "the Agent said the wrong thing" is the symptom. The root cause is almost always upstream:3637- The **AOP** didn't tell the Agent what to do on that branch, or said "use your judgment" where a concrete threshold belonged.38- A **Connection** wasn't available, or was missing scopes the AOP relied on.39- A **Setup input** or **File** the AOP referenced was missing or empty.40- A **terminal action** (`complete_case` / `fail_case` / `postpone_case` / `request_handover`) was missing from a branch.41- The Agent was carrying two Runs of work in one AOP (decomposition signal).4243If you only describe the symptom ("the Gmail call returned 401"), you have not done the work. Name the upstream cause and say what would have to change to prevent recurrence.4445## Inputs you need4647At minimum, one of:4849- A **Run ID** (called `run_id` in the API), or50- An **Agent ID** — from which you resolve the relevant Run (usually the latest, or the latest failed one; see step 1), or51- A **Case ID** if the failure is queue-driven.5253If you have none of these, ask the user for the Run ID before reading anything. Do not guess from context.5455## Tools — read-only public API operations (API mode)5657In API mode, these are the operations you call. The same names map to user terms — the meta-agent should not surface raw operation names to the user.5859- `getRun` — the Run's metadata: status, `build_id`, started/ended timestamps, error summary.60- `listRunMessages` — the full transcript: every tool call, every tool result, every model turn.61- `getRevision` — the **Build that was active for this Run** (use the `build_id` from `getRun`, not the Agent's current Build). This contains the AOP the Agent was actually running against.62- `getCase` / `listCaseRuns` / `listCaseRunRecentMessages` — case state, all Runs that ran on this case, recent transcript for a case-driven Run.63- `listConnections` / `getConnection` — current Connection state. Useful to confirm whether a Connection that failed is still broken now.64- `listRuns` — when you were given an Agent but no Run, resolve the Run to debug: fetch recent Runs newest-first (the default sort) with a small `limit` — usually just the latest, but pull the last few when that context helps (telling a one-off from a recurring failure, or comparing against the last Run that worked), and add `status=failed` to home in on the latest _failed_ Run. Also used to spot a pattern across recent Runs of the same Agent — a small recent window (bounded by `limit`, narrowed with `status` / `has_issues` when you can), not the whole history.65- `getAgent` — Agent-level config (name, current Build) when the user gave you an Agent ID only.6667**Always fetch the revision the Run ran against, not the Agent's current revision.** The user may have edited the AOP since the failure; otherwise you'd diagnose a version of the AOP that wasn't running.6869**Distinguish failure from pause.** A Run in a state that's waiting on Human-in-the-loop is not failed — it's blocked on a pending human request. Confirm the Run status before diagnosing.7071## What to ask the user (paste mode)7273In paste mode, ask for the minimum data needed to diagnose. Tailor the ask to the symptom:74751. **Always:** the Run ID (so the user can cross-reference), the AOP that was in effect at the time of failure (not necessarily the current one — warn the user that an AOP edit since the failure may explain why their _current_ AOP looks fine), and the final error or last few transcript turns.762. **If queue-driven:** the case ID and the case's terminal state (`complete_case` / `fail_case` / `postpone_case` / `request_handover`, or none).773. **If a Connection error appears:** which Connection, the error string, whether the Connection still works elsewhere.784. **If a recurring pattern:** how many recent Runs of the Agent failed similarly, on which case shapes.7980Stop short of asking for everything up front. Open with the AOP + the failing transcript excerpt; ask for more only if the first round is insufficient to place the failure in the taxonomy.8182## Investigation workflow8384The five steps are the same in either mode; only the data source changes.85861. **Anchor on the Run.** Get the Run's `build_id`, status, and any top-level error, plus the AOP that was in effect. _API mode:_ call `getRun`, then `getRevision` with that `build_id`. If you have only an Agent ID, first resolve the Run with `listRuns` (`agent_id`, newest-first by default, a small `limit` — the latest Run, or the last few when comparing helps; add `status=failed` when the user said it failed) — start narrow rather than pulling a wide run list to find one Run. _Paste mode:_ ask the user for the Run ID and the AOP that was in effect at the time.87882. **Read the transcript.** Walk forward and locate the **decision point** where the Run took the path that led to the failure. The final error message is the end of the chain, not its origin. _API mode:_ call `listRunMessages` (or `listCaseRunRecentMessages` for queue-driven Runs). _Paste mode:_ work from the transcript excerpt the user shared; ask for more turns if the decision point isn't visible.89903. **Map the failure to a category** (see taxonomy below). Most Run failures fall into one of eight patterns. Name it.91924. **Pull supporting evidence as needed.** Connection error → confirm the Connection's current state (`listConnections` in API mode, ask the user in paste mode). Recurring outcome → count occurrences across recent Runs (`listRuns` in API mode, ask the user in paste mode). Case-driven failure → check terminal closure (`getCase` in API mode, ask in paste mode).93945. **Propose one fix.** Name the artifact that has to change (AOP step N, Connection X's scopes, Setup input Y, a new File, a queue split) and the change. If the fix is in the AOP, do not rewrite it — hand off to `aop-writer` (see below). _Platform / infra failure:_ there is no artifact of the user's to change — say so plainly and route it to Duvo instead (see Output rule → Next step).9596## Failure-mode taxonomy9798Most Run failures are one of these. Name the category in your diagnosis.991001. **Connection failure.** OAuth expired, scope missing, upstream returned 4xx/5xx. Evidence: a tool-call result that is an error from a Connection. Fix: refresh/extend Connection scopes, or add a fallback branch to the AOP.1011022. **AOP ambiguity.** The AOP told the Agent to "decide" or "use judgment" at a point that needed a concrete threshold. Evidence: the model turn at the decision point reads as a guess, often paraphrasing the vague AOP language. Fix: AOP rewrite to inline an `if [concrete threshold]: [action]` rule.1031043. **Missing terminal closure.** A queue-driven Run ended without `complete_case` / `fail_case` / `postpone_case` / `request_handover` on a branch, so the platform settled the case instead of the AOP: a clean Run end leaves it Completed with the reason `auto-completed on clean run end` and the outcome left to the case evaluation, while a Run that errored or was cut off mid-work leaves it Failed (a Run a human stopped leaves it Canceled instead). Evidence: the Run ended after a non-terminal action and the case carries a platform settlement rather than an Agent one. Note this category does **not** always present as a failure — an auto-completed case can look healthy in the Queue while the branch that should have failed or postponed it never ran, so check the case's outcome (`issues`, or stuck `evaluating`) and not just its status. Fix: add the terminal action to that branch of the AOP.1051064. **Missing HITL on a high-stakes action.** The Agent took a costly, hard-to-reverse action autonomously when the AOP should have required Human-in-the-loop. Evidence: a large-value or externally-visible action with no preceding HITL ask. Fix: gate that branch on a HITL checkpoint.1071085. **Missing data.** The AOP referenced a Setup input, File, or case field that wasn't present. Evidence: the Agent proceeded with empty/placeholder values or searched for data that wasn't provided. Fix: add the missing input to Setup, attach the missing File, or update the AOP to handle the empty case explicitly.1091106. **Batch / iteration leak.** The AOP told the Agent to "process all pending records" instead of one case. Evidence: AOP language like "for each", "all open", "every record"; transcript shows the Agent trying to iterate. Fix: rewrite the AOP to handle a single case — the platform iterates.1111127. **Wrong decomposition.** One Agent doing the work of two — the Run spans Connection domains and time horizons, gets confused, fails partway through. Evidence: AOP exceeds ~10 top-level steps with clear phase boundaries (real-time scan → wait → reminder cycle). Fix: split into two Agents connected by `request_handover` or a queue.1131148. **Platform / infra failure.** The platform itself broke, not the Agent's configuration: the Run died before or outside its AOP, the platform's own tool layer errored, the same internal error repeats on every retry, or a Connection keeps failing after a clean reauthentication. Evidence: an infrastructure- or platform-level error rather than an upstream response from the user's own system, reproducing identically across Runs and independent of the case data — and no AOP, Setup, or Connection change would have prevented it. The discriminator against **Connection failure**: an expired token or a missing scope is the user's to fix; a Connection that fails again straight after a successful reauthentication is not. Fix: none in the user's artifacts — this one goes to Duvo (see Output rule → Next step), with the Run id, the Build id, the exact error, and what you ruled out.115116If you cannot place a failure in one of these, name the pattern plainly. Do not force-fit.117118## What a "fix" looks like119120A fix is **one concrete change to one artifact**:121122- "Add to Step 4 of the AOP: _If the amount > $5,000, use **Human in the loop** to confirm before sending._"123- "Extend the **Gmail** Connection scopes to include `gmail.send`."124- "Add a `supplier_tier_a_threshold` Setup input; reference it in Step 2 of the AOP."125- "Split the AOP at Step 6 into a second Agent connected via `request_handover`."126127Avoid: "review your AOP", "tighten the logic", "consider escalating earlier". Vague suggestions are not fixes.128129## Handoff to `aop-writer`130131If the fix is in the AOP, **stop short of rewriting it in this skill.** Hand off to `aop-writer` with two things:1321331. The exact AOP that was in effect (from `getRevision`).1342. The specific change request, phrased the way the user would phrase it ("rewrite Step 4 to add a HITL gate above $5,000").135136`aop-writer` returns the rewritten AOP. You do not.137138This split is intentional. `run-debugger` finds the bug. `aop-writer` writes the fix. Mixing the two produces shallow rewrites and unanchored diagnoses.139140## Anti-patterns — reject141142- **Diagnosing without reading the transcript.** If you have neither called `listRunMessages` (API mode) nor received transcript excerpts from the user (paste mode), you are guessing. Do not return a diagnosis.143- **Diagnosing against the current AOP** when the failed Run ran against an earlier Build. Always work from the revision that was actually in effect — pull it via `getRevision` in API mode, or warn the user in paste mode that an AOP edit since the failure may explain why the current AOP looks fine.144- **Stopping at the surface error.** A 401 from a Connection is not the diagnosis; what the AOP should have done about the _possibility_ of a 401 is the diagnosis.145- **Bundling multiple unrelated fixes.** Most Run failures have one root cause. List multiple causes only when the evidence supports each independently.146- **Rewriting the AOP inline.** Hand off to `aop-writer`.147- **Inventing Connection names, case fields, or tool calls** the transcript doesn't show. Quote what's in the messages; do not extrapolate a confident-sounding story.148149## Output rule150151Return one structured response with these labelled sections, in this order:152153- **Failure mode** — one of the taxonomy categories, or a named pattern.154- **Where it went wrong** — the specific point in the transcript and the matching AOP step.155- **Evidence** — one or two quoted lines from the transcript or the AOP. Quote, do not paraphrase.156- **Fix** — one concrete change to one artifact.157- **Next step** — the immediate handoff, e.g. "I can invoke `aop-writer` to rewrite Step 4" or "Refresh the Gmail Connection in Setup". When the failure mode is **Platform / infra failure**, the next step is to get the diagnosis to Duvo rather than to change anything of the user's: if a support-escalation tool is in your tool list (Duvo's in-product chat), draft the escalation there — this diagnosis is its material (symptom, Run and Build ids, what you ruled out), and the user reviews the draft and sends it, so never tell them it's been reported. If no such tool is available, tell the user to raise it with Duvo support from the Duvo web app, and hand them this diagnosis to include.158159If the user asked for a pattern hunt across multiple Runs ("why does this Agent keep failing"), return one diagnosis per recurring failure mode, ordered by frequency.160161## Reading the request1621631. **Find the Run (or Agent, or Case) reference** in the conversation. If absent, ask before reading.1642. **Determine intent.** Single-Run depth ("why did _this_ Run fail", "my last Run failed", "this Run sent the wrong email") vs. pattern sweep ("why does _this Agent_ keep failing"). Single-Run intent — including "my last Run" with no ID — wants depth on the most recent Run: fetch it with `listRuns` newest-first and a small `limit` (usually just the latest; pull the last few when it helps place the failure; add `status=failed` if they said it failed), then dig in. The pattern sweep wants a _bounded_ recent window across the Agent's Runs — a small recent slice, not the whole history; a true Agent-wide audit is `workflow-debugger`.1653. **Determine queue vs. standalone shape.** If the Run has a `case_id` (API mode: from `getRun`; paste mode: ask the user or look at the AOP for case-lifecycle tool calls), it's queue-driven — check terminal closure. Otherwise focus on the final tool call and its result.166167Use only data returned by configured Duvo access (API mode) or shared by the user (paste mode). Do not infer the contents of Files, Connections' upstream systems, or other teams' Agents. The transcript and the revision are the source of truth.168169## Final check before returning170171Walk through this once on your draft. Fix anything that fails.172173- [ ] Your diagnosis is grounded in the actual transcript and AOP — either pulled via API (`getRun`, `getRevision`, `listRunMessages` or their case equivalents) or pasted by the user. Not in a guess.174- [ ] You worked from **the AOP that was in effect at the time of the Run**, not the Agent's current AOP.175- [ ] The failure mode is named — not "something went wrong".176- [ ] The evidence is a quoted line from the transcript or AOP, not paraphrase.177- [ ] The fix is one concrete change to one artifact — not a list of suggestions.178- [ ] If the fix is in the AOP, you stopped short of rewriting and pointed at `aop-writer`.179- [ ] Duvo terminology used: Agent, Run, AOP, Connection, Files, Login, Setup.180- [ ] You did not invent tool names, Connections, or case fields the transcript doesn't show.181182## Duvo terminology183184Use Duvo's nouns when describing the failure and the fix. Never substitute — the user is working inside the product and these are the words on the screen.185186| Use | Not |187| ---------- | ----------------------------------- |188| Agent | assignment, AI teammate, bot |189| Run | task, job, execution |190| Build | revision, version |191| AOP | SOP, instructions, prompt, playbook |192| Connection | integration, account |193| Files | knowledge base, documents |194| Login | credential, password |195| Start Work | run agent, execute |196| Setup | configuration, config |197198## See also199200- `aop-writer` — once you've named the failure, hand off the in-effect AOP and the change request; this skill never rewrites AOPs itself.201- `workflow-debugger` — when the problem is the Agent's behaviour across many Runs rather than this one Run, audit the whole workflow there; it hands representative Runs back to this skill for transcript-level depth.202- `duvo-cli` — command references for a session configured to use the CLI, or a user debugging from a terminal.203204## Resources205206- [Duvo](https://duvo.ai) — product website207- [Duvo documentation](https://docs.duvo.ai) — building Agents, AOPs, Connections, queues208- [Web app](https://app.duvo.ai) — open the Run, inspect the transcript and the Build that ran it209- [Duvo CLI (`@duvoai/cli`)](https://www.npmjs.com/package/@duvoai/cli) — standalone terminal access; managed sessions follow their configured runtime210- [Public skill repository](https://github.com/duvoai/skills) — the MIT-licensed community release of this skill, packaged for installation in third-party Claude Code setups
Run npx skillmds@latest add duvoai/run-debugger in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Investigate why a Duvo Run failed or produced the wrong outcome. Use when the user shares a failed Run, asks "why did this Run fail", or wants to fix a recurring failure on an Agent. Reads the Run's transcript and the Build that was active for it via the Duvo public API, names the root cause from a fixed failure-mode taxonomy, and proposes one concrete fix — handing off to aop-writer for any AOP rewrite. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
duvoai (@duvoai) published this skill. Their other Agent Skills are listed on their SkillMD profile.