# `Jido.Agent.Directive.Error`
[🔗](https://github.com/agentjido/jido/blob/v2.3.0/lib/jido/agent/directive.ex#L155)

Signal an error from agent command processing.

This directive carries a `Jido.Error.t()` for consistent error handling.
The runtime can log, emit, or handle errors based on this directive.

## Fields

- `error` - A `Jido.Error.t()` struct
- `context` - Optional atom describing error context (e.g., `:normalize`, `:instruction`)

# `t`

```elixir
@type t() :: %Jido.Agent.Directive.Error{context: nil | atom(), error: any()}
```

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for Error.
