# `Pixir.Subagents.Scheduler`
[🔗](https://github.com/Ranvier-Technologies/pixir/blob/main/lib/pixir/subagents/scheduler.ex#L1)

Pure scheduling policy for Subagent fan-out.

The subagent manager owns lifecycle, timers, logs, and child Sessions. This
module owns only queue selection and concurrency decisions so those rules can be
tested without starting BEAM processes or provider Turns.

# `can_start?`

Returns whether a new or queued Subagent can start under `max_threads`.

Only agents with status `"running"` count against the limit. This preserves the
current Manager policy where terminal, detached, and queued agents do not
consume runtime slots.

# `next_startable`

Returns the next queued agent that can start, preserving parent insertion order.

# `running_count`

Counts currently running Subagents in a parent fan-out.

---

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