# `ExAthena.Tools.PlanMode`
[🔗](https://github.com/udin-io/ex_athena/blob/v0.7.1/lib/ex_athena/tools/plan_mode.ex#L1)

Toggle the loop's permission phase.

The loop treats `ctx.phase` as the canonical permission mode. This tool is
how the model requests a transition:

  * `"enter"` — switch to `:plan` (read-only). Loop typically enforces this
    by rejecting mutation tools.
  * `"exit"` — switch to `:default`. The loop may require user approval
    (via `can_use_tool`) before honouring this.

The tool doesn't mutate `ctx` directly — `ctx` is immutable per-call. It
returns a `{:phase_transition, new_phase}` sentinel that the loop consumes
and applies to subsequent iterations.

---

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