> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/durable-operation-contract.md).

# Durable operation contract

Durable operation states, polling, result fields, recovery, cancellation, and authority checkpoints.

## States

`queued`, `running`, `waiting`, `succeeded`, `failed_retryable`, `failed_terminal`, and `cancelled`.

Terminal states are `succeeded`, `failed_terminal`, and `cancelled`. A retryable failure is not terminal because an authorized resume can continue it.

## Public fields

An operation reports its UUID, type, state, stage, retryability, attempt count, related resource IDs, safe result, safe error, timestamps, and import progress when available.

## Polling

Keep the operation ID returned by a durable workflow. Call `get_operation` until the operation is terminal or requires a deliberate recovery. Do not repeat the original start request because a chat or network connection ended.

## Resume

`resume_operation` previews and then continues supported retryable, stale, or waiting checkpoints. It revalidates current scope, account access, resource permission, and operation-specific policy. A new execution grant can be bound for the same actor and tenant after fresh confirmation.

## Cancel

`cancel_operation` previews and stops eligible active work. Publish and import cancellation can wait for a domain checkpoint. An active listener password reset cannot be cancelled safely.

## Authorization checkpoints

Background work rechecks authority at safe stages. Revocation prevents new calls and stops work when the operation can no longer proceed. Completed partial effects remain available for verification.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/durable-operation-contract.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
