# `Raxol.AgentClientProtocol.Connection.TurnState`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/connection.ex#L44)

Per-session open-turn state, populated only on a client-role Connection.

Opened by `Connection`'s outbound submit path at a successful
`session/prompt` async-owner submission (`reply_to = {:owner, ...}`);
closed by whichever of response / timeout / cancel / transport-down
resolves the request first. `token` is minted fresh (`make_ref/0`) at
open and never derived from any peer-supplied id: a peer that replays or
reuses a session/request id cannot alias a stale turn's straggler into a
new turn, because the tokens differ by construction.

# `t`

```elixir
@type t() :: %Raxol.AgentClientProtocol.Connection.TurnState{
  next_ordinal: non_neg_integer(),
  out_id: term(),
  owner: pid(),
  tag: term(),
  token: reference()
}
```

---

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