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

# oth.is_hook_thread

Checks if the specified thread is executing inside an Oth hook callback.

```luau theme={null}
oth.is_hook_thread(thread: thread?): boolean
```

## Parameters

| Parameter | Type     | Description                                                       |
| --------- | -------- | ----------------------------------------------------------------- |
| `thread`  | `thread` | *(Optional)* The thread to check. Defaults to the current thread. |

## Returns

`boolean` - `true` if it is a hook thread, `false` otherwise.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  print("Is current thread hook thread? ", oth.is_hook_thread())
  ```

  ```luau Example 2 theme={null}
  oth.hook(print, function(...)
      assert(oth.is_hook_thread() == true)
  end)
  ```
</CodeGroup>

<Tip>
  Allows identifying when execution has detoured.
</Tip>
