---
url: 'https://adk.nht.io/api/@nhtio/adk/interfaces/WarningEvent.md'
description: >-
  A non-fatal warning surfaced on a runner's observability bus. Distinct from
  `error` (which ends the turn/dispatch): a `warning` means "something degraded
  but we continued." The first consumer is the token-estimation contract — when
  a real tokenizer throws inside a runner, the estimator degrades to a
  char-based guesstimate and emits this instead of throwing (see
  `utils/estimation_context`). The event shape mirrors [`LogEvent`](https://adk.nht.io/api/@nhtio/adk/dispatch_runner/interfaces/LogEvent) so
  consumers can render both uniformly, with `dispatchId`/`iteration` optional
  because a warning can also originate from a turn-level scope (no active
  dispatch).
---

# Interface: WarningEvent

Defined in: [src/lib/types/dispatch\_runner.ts:243](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L243)

A non-fatal warning surfaced on a runner's observability bus. Distinct from `error` (which ends the
turn/dispatch): a `warning` means "something degraded but we continued." The first consumer is the
token-estimation contract — when a real tokenizer throws inside a runner, the estimator degrades to a
char-based guesstimate and emits this instead of throwing (see `utils/estimation_context`). The event
shape mirrors [LogEvent](../dispatch_runner/interfaces/LogEvent.md) so consumers can render both uniformly, with `dispatchId`/`iteration`
optional because a warning can also originate from a turn-level scope (no active dispatch).

## Properties

| Property                                       | Type                                                                                                               | Description                                                                      | Defined in                                                                                                                        |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|  `dispatchId?` | `string`                                                                                                           | Stable identifier for the dispatch that produced the event, when one was active. | [src/lib/types/dispatch\_runner.ts:245](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L245) |
|  `emittedAt`    | `DateTime`                                                                                                         | When the event was emitted.                                                      | [src/lib/types/dispatch\_runner.ts:249](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L249) |
|  `error?`           | `unknown`                                                                                                          | The underlying error that triggered the degrade, when applicable.                | [src/lib/types/dispatch\_runner.ts:257](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L257) |
|  `iteration?`   | `number`                                                                                                           | 0-based iteration index within the dispatch, when one was active.                | [src/lib/types/dispatch\_runner.ts:247](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L247) |
|  `kind`              | `string`                                                                                                           | Stable discriminator (e.g. `'token-estimation-degraded'`).                       | [src/lib/types/dispatch\_runner.ts:253](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L253) |
|  `message`        | `string`                                                                                                           | Human-readable message.                                                          | [src/lib/types/dispatch\_runner.ts:255](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L255) |
|  `payload?`       | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `unknown`> | Optional structured detail block (e.g. `{ encoding }`).                          | [src/lib/types/dispatch\_runner.ts:259](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L259) |
|  `source`          | `string`                                                                                                           | Which runner surfaced the warning (`'dispatch-runner'`                           | `'turn-runner'`), for provenance.                                                                                                 | [src/lib/types/dispatch\_runner.ts:251](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/lib/types/dispatch_runner.ts#L251) |
