# komrad hook stop-failure

Record that an API error ended an agent's turn

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

```bash
komrad hook stop-failure
```

Claude runs this in place of its Stop hook when a rate limit, an outage or any other API error ends the turn. Komrad keeps the error against the agent so the panel can say the turn failed rather than finished.

## Inherited flags

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