---
title: "Rerun a run's failed cases"
method: POST
path: "/projects/{projectId}/eval-runs/{runId}/rerun"
tags: ["Eval runs"]
---

# Rerun a run's failed cases

`POST /projects/{projectId}/eval-runs/{runId}/rerun`

Replay a finished run's frozen snapshot narrowed to the cases that did not pass: every case with a trial that is not completed and passed (cancelled and skipped trials do not count). The platform selects the cases — see the rerun preview. The new run records `rerunOfRunId` and `rerunScope`, and because its pass rate is biased by that selection it is never used as the suite's latest run, a trend point, or a comparison/gate baseline. Returns `409` with `details.reason` `RERUN_NOTHING_TO_RERUN` when nothing qualifies, or `RERUN_SOURCE_NOT_TERMINAL` while the run is still in flight. Honors the `Idempotency-Key` header.

## Path parameters

- `projectId` string, required
- `runId` string, required

## Request body

- object
  - `scope` 'failed_cases', required — The only scope: every case with a trial that did not complete and pass.
  - `notes` string
  - `idempotencyKey` string

## Response `202`

The rerun was started (or, on an idempotent retry, the run it already started).

- object
  - `runId` string, required
  - `suiteId` string, required
  - `status` string, required
  - `deduped` boolean
  - `rerunOfRunId` string, required
  - `rerunScope` 'failed_cases', required
  - `servers` object[]
    - `id` string
    - `name` string
  - `environment` EvalRunEnvironment, nullable — The project environment a run is pinned to, at the revision resolved when it launched. `null` for a legacy run that used the suite's saved server selection.
    - `id` string, required
    - `name` string, nullable
    - `revision` integer, nullable — The environment revision the run executed against.

## Other responses

- `400` — Malformed body or parameters.
- `401` — Missing, invalid, revoked, or orphaned key (`UNAUTHORIZED`) — or the **target MCP server** needs an OAuth grant (`OAUTH_REQUIRED`), which is a property of the server, not your key.
- `403` — Key is valid but not allowed to do this.
- `404` — Unknown project, server, or resource.
- `409` — Nothing in the run qualifies (`RERUN_NOTHING_TO_RERUN`), or the run is still in flight (`RERUN_SOURCE_NOT_TERMINAL`).
- `429` — Per-key rate limit exceeded (60 requests/minute sustained, bursts up to 10). Honor `Retry-After` and back off with jitter.
- `500` — Something failed on MCPJam's side.
- `502` — Could not connect to the target MCP server.

## Changes

- **2026-10-05** `aea5de5036d4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mcpjam/apis/mcpjam-api/changes/projects/:projectId/eval-runs/:runId/rerun/post.md)

---

[API](https://skmtc.dev/mcpjam/apis/mcpjam-api.md) · [All operations](https://skmtc.dev/mcpjam/apis/mcpjam-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mcpjam/apis/mcpjam-api/revisions/97bd992b9977?raw)
