# `H.Session.Supervisor`
[🔗](https://github.com/parlant/harness/blob/v0.3.0/lib/h/session/supervisor.ex#L1)

Per-session `:one_for_all` supervision boundary (`Task.Supervisor` + `H.Session.Server`).

Started under `DynamicSupervisor` with `restart: :temporary` so a failing
session never consumes the shared `DynamicSupervisor` restart budget or
cascades across healthy sessions. Exceeding the internal restart budget
(`max_restarts: 2, max_seconds: 5`) or hitting an unrecoverable storage error
quarantines the session in `H.Catalog` and stops cleanly.

# `child_spec`

```elixir
@spec child_spec(keyword()) :: Supervisor.child_spec()
```

Returns a `:temporary` supervisor child spec for `DynamicSupervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the per-session supervisor wrapper.

# `stop_session`

```elixir
@spec stop_session(atom(), Supervisor.supervisor(), String.t()) :: :ok
```

Cleanly stops and unloads the per-session supervisor and its children from RAM
without quarantining the session in `H.Catalog`.

---

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