Skip to content

Add dcd retry command and MCP tool to retry failed flows in an existing upload #366

Backlog

Description

@riglar

Request

Let users retry a failed flow from the CLI and over MCP, the way the console's "retry" button does. The retry should stay in the same upload.

Something like:

dcd retry --upload-id <id> --flow <name>   # retry one flow
dcd retry --upload-id <id>                 # retry every failed flow in the upload
dcd retry --result-id <id>                 # retry one result by id

What already exists

The API already does this: POST /uploads/retryTest (UploadsController_retryTest, already in src/types/generated/schema.types.ts).

  • { resultId } retries one result and returns the new result id.
  • { uploadId } retries every failed result in the upload and returns retriedCount.
  • Exactly one of the two must be given.

So this is CLI and MCP work only. No API change should be needed.

Work

  1. dcd retry command (src/commands/retry.ts).
    • --result-id: call the endpoint directly.
    • --upload-id alone: retry all failed flows.
    • --upload-id + --flow <name>: look up the upload's results (as dcd status does), find the result whose flow name matches, and retry that one. Error clearly if no flow matches, or if more than one does (the same flow on several devices). In that case, list the matching result ids so the user can pass --result-id.
    • Print the new result id, or the retried count. Optionally --watch to follow the upload like dcd cloud does.
    • --json output, to match the other commands.
  2. MCP tool (src/mcp/tools/retry-test.ts), with the same inputs. It is billable, so describe it that way, as dcd_run_cloud_test does.
  3. Docs and README entry.
  4. Tests for the flow-name lookup (no match, one match, several matches) and for the API error paths (for example, retrying a result that has not failed).

Done when

  • A user can retry one failed flow, or all failed flows, in an existing upload from the CLI and from MCP, without opening the console.
  • The retried result shows up in the same upload in the console.

Activity

  1. added
    enhancement
    on Nov 30, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions