# `Codex.TransportError`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.18.1/lib/codex/transport_error.ex#L1)

Raised when the codex executable exits unexpectedly.

The `retryable?` field indicates whether the error is transient and the
operation can be safely retried. This is used by `Codex.Retry` to determine
whether to attempt automatic retries.

# `t`

```elixir
@type t() :: %Codex.TransportError{
  __exception__: true,
  exit_status: integer(),
  message: String.t(),
  reason_code: atom() | nil,
  retryable?: boolean(),
  stderr: String.t() | nil,
  stderr_truncated?: boolean()
}
```

# `new`

```elixir
@spec new(
  integer(),
  keyword()
) :: t()
```

Creates a new `TransportError`.

## Options

  * `:stderr` - Standard error output from the process
  * `:stderr_truncated?` - Whether stderr output was truncated
  * `:message` - Custom error message
  * `:retryable?` - Whether the error is retryable (default: inferred from exit status)

# `retryable_status?`

```elixir
@spec retryable_status?(integer()) :: boolean()
```

Determines if an exit status indicates a retryable error.

Retryable statuses include:
- Signal-based exits (128+) for SIGTERM, SIGKILL, SIGPIPE
- Exit code 75 (EX_TEMPFAIL)
- Exit code 69 (EX_UNAVAILABLE)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
