---
title: "Retry the steps of a plan proposal that did not succeed"
method: POST
path: "/api/copilot/threads/{threadId}/actions/{actionId}/retry"
tags: ["Copilot"]
---

# Retry the steps of a plan proposal that did not succeed

`POST /api/copilot/threads/{threadId}/actions/{actionId}/retry`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/copilot/threads/{threadId}/actions/{actionId}/retry`
- Auth: API key in cookie `luca.session_token`

Runs again the steps of a plan proposal that ended short, failed, or stopped showing progress, as the coach who retries. Steps that succeeded stay as they are, and a step whose answer was unclear runs again only on a route with an idempotency key. A run that is still working is left alone. You'll get a 409 if the proposal is waiting for approval, already applied, or closed, or if the `revision` changed, and a 410 once it expired. Send the `revision` the coach saw.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Path parameters

- `threadId` string, uuid, required
- `actionId` string, uuid, required

## Headers

- `Luca-API-Version` '1'

## Request body

- CopilotProposalRetryRequest
  - `revision` integer, required

## Response `200`

ok

- CopilotProposalRetriedResponse
  - `action` CopilotProposal, required
    - `id` string, uuid, required
    - `threadId` string, uuid, required
    - `operationId` string, nullable, required
    - `planKind` string, nullable, required
    - `revision` integer, required
    - `payload` object, required
      - `steps` object[]
        - `operationId` string, required
        - `input` unknown
      - `items` unknown[]
        - unknown
    - `payloadHash` string, nullable, required
    - `diff` object[], required
      - `label` string, required
      - `before` string
      - `after` string
      - `index` integer
    - `sideEffects` string[], required
    - `card` object, required
      - `title` string, required
      - `text` string, required
      - `warning` string
      - `fields` object[]
        - `name` string, required
        - `label` string, required
        - `kind` 'string' | 'text' | 'number' | 'enum' | 'list', required
        - `options` object[]
          - `value` string, required
          - `label` string, required
        - `value` unknown
    - `outcomes` object[], required
      - `index` integer, required
      - `status` string, required
      - `httpStatus` integer, nullable, required
      - `message` string, nullable, required
      - `resultRef` string, nullable, required
      - `result` unknown
      - `resultOmitted` 'too_large': Set when a step that spends AI credits succeeded but its answer was too large to keep. Absent otherwise.
    - `status` string, required
    - `expiresAt` string, required
    - `stuck` boolean, required: The run ended short, failed, or stopped showing progress, so the coach may retry or discard it.
    - `toolName` string, nullable, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `403`: forbidden
- `404`: not found
- `409`: conflict
- `410`: gone
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
