Skip to content

Surface flow-run failure reasons in list-flow-runs and get-flow #707

Description

@showmethecold

Is your feature request related to a problem? Please describe.

When a Prep flow run fails, neither list-flow-runs nor get-flow can say why. They
report status: "Failed" and nothing more, so an agent cannot answer the first question
a user actually asks: "why did my flow run fail?"

Today the only recourse is mcp.failureInsight, a deep link into the Tableau UI. That
ends the conversation and pushes the person into a browser to read the reason themselves.
It was the right fallback when the reason was only reachable through the background job,
which requires admin permissions — non-admin callers had no path to a cause at all.

Related questions are equally unanswerable: is this one systemic problem or many unrelated
ones, and which flows are affected?

Describe the solution you'd like

REST API 3.30 adds failureReason { available, message } to failed flow runs, sourced from
the flow's output-step errors rather than the admin-only background job — so any caller who
can see a run can now read why it failed. I'd like both tools to surface it:

  1. Add failureReason to the flow-run schema, so the message rides along on each failed run.
  2. Add mcp.failureSummary to both tools: the window's failures grouped by reported message,
    each group carrying how many runs reported it and which distinct flows it hit.
  3. Gate the existing mcp.failureInsight deep link so it appears only when nothing in the
    window resolves a cause, making the UI hand-off a genuine last resort instead of the
    default answer.
  4. No behavior change when no reason comes back, so servers below 3.30 and windows without
    failures keep their current output.

The summary shape, which lets an agent tell one systemic problem across many flows from many
unrelated ones without reading every record:

{
"failedRunCount": 7,
"failedFlowCount": 3,
"reasons": [
{
"message": "Flow processing error",
"available": true,
"runCount": 5,
"flowIds": ["", ""]
}
]
}

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions