# detect_pending_interrupts

> **Function** in `langchain_azure_ai`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-ai/agents/hosting/_converters/_hitl/detect_pending_interrupts)

Return the interrupts pending on the checkpointed state, if any.

``StateSnapshot.interrupts`` accumulates every interrupt recorded on the
checkpoint and is *not* pruned as they are answered, so after a partial
resume of parallel interrupts it may still report the ones already
satisfied. Deriving the list from ``StateSnapshot.tasks`` and skipping
tasks that produced node output keeps the initial lookup aligned with
what is outstanding in the common case. After a graph invocation,
:func:`track_pending_interrupts` provides the authoritative active set.

## Signature

```python
detect_pending_interrupts(
    graph: Runnable[Any, Any],
    config: RunnableConfig,
) -> tuple[Interrupt, ...]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `graph` | `Runnable[Any, Any]` | Yes | The runnable to inspect. Runnables without an ``aget_state`` method have no checkpointed interrupts and return an empty tuple. |
| `config` | `RunnableConfig` | Yes | The :class:`RunnableConfig` identifying the thread. |

## Returns

`Interrupt`

A tuple of :class:`Interrupt` objects (empty when none pending or

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/7a6a664d617264df8dcb12fcfb1bacc09f21d504/libs/azure-ai/langchain_azure_ai/agents/hosting/_converters/_hitl.py#L106)