# Async Hook

> A command hook that runs in the background while Claude goes on.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** async: true, asyncRewake

## Think of it like

It is like you start the washing machine. Then you do other jobs.

## Definition

An async hook is a command hook with async set to true. It runs in the background, and Claude does not wait for it. When it ends, its additionalContext and systemMessage reach Claude on the next turn. Claude has already moved on, so it cannot block a thing. asyncRewake is a kind that wakes Claude at once if the hook exits 2.

## Example

Jack's tests take two minutes. As an async hook after each write, they run while Claude goes on, and the results arrive on the next turn.

## Example code

```json
{
  "type": "command",
  "command": "./run-tests.sh",
  "async": true
}
```

Run the tests without making Claude wait.

## Why it matters

A slow check no longer stalls every edit.

## Common mistake

Making a guard async. By the time it says no, the action has already happened.

## Three principles

- **Runs in the background.** Claude goes on.
- **Results next turn.** As context.
- **Cannot block.** Too late.

## Related terms

- [Command Hook](https://learn.benibix.com/term/ai/command-hook)
- [additionalContext](https://learn.benibix.com/term/ai/hook-additional-context)
- [PostToolUse Hook](https://learn.benibix.com/term/ai/posttooluse-hook)

---

Source: https://learn.benibix.com/term/ai/async-hook
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
