# komrad hook

Run one of the agent CLI hooks komrad installs

[komrad](https://komrad.dev/latest/cli.md)

```bash
komrad hook
```

An agent CLI runs these itself at a point in its own loop. They read the hook payload on stdin and write whatever that CLI expects on stdout. Nothing here is meant to be run by hand.

## Commands

-   [`komrad hook compacted`](https://komrad.dev/latest/cli/hook/compacted.md)
    
    Remind an agent of its own record once its conversation has compacted
    
-   [`komrad hook permission-request`](https://komrad.dev/latest/cli/hook/permission-request.md)
    
    Record the tool an agent is waiting to be allowed to run
    
-   [`komrad hook post-tool-use`](https://komrad.dev/latest/cli/hook/post-tool-use.md)
    
    Record that an agent's tool call returned
    
-   [`komrad hook post-tool-use-failure`](https://komrad.dev/latest/cli/hook/post-tool-use-failure.md)
    
    Record that an agent's tool call failed
    
-   [`komrad hook pre-tool-use`](https://komrad.dev/latest/cli/hook/pre-tool-use.md)
    
    Record the tool an agent is about to run
    
-   [`komrad hook stop`](https://komrad.dev/latest/cli/hook/stop.md)
    
    Record that an agent's turn ended
    
-   [`komrad hook stop-failure`](https://komrad.dev/latest/cli/hook/stop-failure.md)
    
    Record that an API error ended an agent's turn
    
-   [`komrad hook turn-end`](https://komrad.dev/latest/cli/hook/turn-end.md)
    
    Record that an agent's turn ended
    

## Inherited flags

| Flag | Type | Description |
| --- | --- | --- |
| [`--config`](https://komrad.dev/latest/cli/hook.md#inherited-config) | stringArray | path to a config TOML, repeatable, later files win over earlier ones |
| [`--engine`](https://komrad.dev/latest/cli/hook.md#inherited-engine) | string | engine to reach: local for this machine, or a file in the config's engines directory, layered over the config |
