> 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/make-changes-safely/monitor-a-long-running-operation.md).

# Monitor a long-running operation

Follow one durable Podigee operation from acceptance to a verified terminal result.

Use the operation ID returned by Podigee to follow work that continues after the original request.

## Before you start

* Keep the exact operation ID.
* Connect as the same user and select the same Podigee account.
* Keep the read scope required by the operation type.

## Monitor the operation

1. Ask your agent to inspect the operation with its operation ID.
2. Record the current `state`, `stage`, and `attempts` values.
3. If present, review `progress.current`, `progress.total`, and `progress.percent`.
4. Continue checking the same operation while its state is `queued`, `running`, or `waiting`.
5. Stop polling when it reaches `succeeded`, `failed_terminal`, or `cancelled`.
6. If it reaches `failed_retryable`, review the error before you decide whether to resume it.
7. Preserve the final result and related podcast, episode, production, import, or listener IDs.

Do not start the original request again only because the chat, terminal, or network connection ended.

## Expected result

You can follow one operation through its stages without creating duplicate work. Long podcast imports can also show item-level progress, including the current episode when available.

## If the operation is not found

Confirm the operation ID, connected user, and selected account. An operation is visible only inside its recorded account boundary and with the required read scope.

Do not create a replacement operation until you have confirmed that the original cannot be recovered.

## If the operation stops progressing

Read its current state and error. A `failed_retryable` state can support a controlled resume. An active cancellation or a terminal failure needs a different recovery route.

## Next step

* [Resume or cancel an operation](/documentation/start-here/ai-agents/make-changes-safely/resume-or-cancel-an-operation.md)
* [Verify that a change had the intended effect](/documentation/start-here/ai-agents/make-changes-safely/verify-that-a-change-had-the-intended-effect.md)


---

# 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/make-changes-safely/monitor-a-long-running-operation.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.
