> ## Documentation Index
> Fetch the complete documentation index at: https://darwin.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Action lifecycle

> Model durable work as explicit states and available next actions.

An Action keeps one stable `actionId` as work runs, pauses for the user, resumes, and reaches a terminal outcome.

## Read the current state

| Status                   | Client behavior                                                  |
| ------------------------ | ---------------------------------------------------------------- |
| `running`                | Poll Get action with bounded backoff.                            |
| `awaiting_user`          | Display `actionRequired` and allow an update.                    |
| `approval_required`      | Present the exact reviewed payload and approval choices.         |
| `connection_required`    | Open the first-party `webLink` when the user chooses to connect. |
| `payment_required`       | Present the bound purchase terms and first-party `webLink`.      |
| `insufficient_authority` | Explain that the current credential or AI cannot continue.       |
| `provider_unavailable`   | Keep the failure truthful and offer an appropriate retry later.  |
| `completed`              | Read the final result.                                           |
| `stopped`                | Stop polling and show that the current work was stopped.         |

## Follow `availableActions`

Darwin returns which of `status`, `update`, `approve`, and `stop` are valid now. Use that array as the source of truth for controls instead of reconstructing permissions from the status string.

## Resume browser interactions

Connections and payments complete out of band. A redirect arrival or popup closure is not proof of success. Continue polling the same `actionId`; Darwin resumes the same Turn only after backend confirmation.

Stopping ends the current queued or running Turn. It does not claim that an external transaction, delivery, or provider-side operation was canceled.
