# `Raxol.AgentClientProtocol.Schema.ClientTypes.WaitForTerminalExitResponse`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/schema/client_types.ex#L1022)

Response containing the exit status of a terminal command.

## Fixed defect (wire-shape, vs. schema-oracle)

Upstream wrapped the exit info in a nested `exitStatus: TerminalExitStatus`
object (mirroring `TerminalOutputResponse`'s shape). The schema-oracle has
`exitCode`/`signal` flattened directly on this response, with no nesting
and no required fields (both nullable). Fixed here to flatten --
`to_json`/`from_json` no longer round-trip through `TerminalExitStatus`.

Ported from the MIT `f1729/agent_client_protocol` (c) 2025 f1729; see NOTICE.md.

# `t`

```elixir
@type t() ::
  %Raxol.AgentClientProtocol.Schema.ClientTypes.WaitForTerminalExitResponse{
    _meta: map(),
    exit_code: non_neg_integer() | nil,
    signal: String.t() | nil
  }
```

# `from_json`

```elixir
@spec from_json(term()) :: {:ok, t()}
```

Total: never raises, even for a non-map argument.

# `new`

```elixir
@spec new(non_neg_integer() | nil, String.t() | nil) :: t()
```

# `to_json`

```elixir
@spec to_json(t()) :: map()
```

---

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