# reduce_hook_results

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/hooks/reducer/reduce_hook_results)

Reduce ordered handler results into an event-specific decision.

## Signature

```python
reduce_hook_results(
    invocation: HookInvocation,
    results: Iterable[HandlerResult],
    *,
    diagnostics: Iterable[HookDiagnostic] = (),
) -> HookDecision
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `invocation` | `HookInvocation` | Yes | Native event being processed. |
| `results` | `Iterable[HandlerResult]` | Yes | Handler results in configuration order. |
| `diagnostics` | `Iterable[HookDiagnostic]` | No | Snapshot or orchestration diagnostics to retain. (default: `()`) |

## Returns

`HookDecision`

The normalized decision for the invocation event.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/hooks/reducer.py#L83)