# Upgrade Guide — vNEXT

<!-- assembled-by: assemble-next-md -->
<!-- bump: patch -->

## What to Tell Your User

If you set an overnight restart window, your agent no longer sits on a downloaded update all day when nothing is going on. It updates right away while idle, and still waits for the window whenever you actually have work in progress — so updates land sooner without ever interrupting you.

## Summary of New Capabilities

- The restart-window gate now consults a pure, side-effect-free session probe before deferring: idle (no active sessions) restarts immediately outside the window; active sessions defer to the window as before. The deferral record now also names the blocking sessions instead of leaving them blank.

## Evidence

- Unit (UpdateGate): the new idle probe returns active session names, ignores idle background jobs, and — critically — does NOT start the deferral clock or set warning state (proven by a purity test); its classification is asserted identical to the restart gate so the two can never drift.
- Unit (restart-window): outside the window with an active session still defers; outside the window while idle restarts immediately. Both decision-boundary sides covered.
- The existing restart gate logic is byte-for-byte unchanged (extracted into a shared classifier); the cascade-dampener integration tests stay green.

## What Changed — Idle agents apply update-restarts immediately instead of waiting for the restart window

Agents can set a restart window (e.g. 02:00–05:00) so update-restarts only happen overnight and never interrupt active work. But the window was applied unconditionally: even when the agent was completely idle — no active session, nothing to protect — a downloaded update would sit unapplied for hours until the window opened. The agent ran a stale version all day for no reason.

Now the window only holds a restart when there is active work to protect. If the agent is idle when an update lands outside the window, it restarts right away (an idle restart is invisible — it is exactly what already happens for idle agents inside the window). The moment any session is active, the window is honored exactly as before and the restart waits.
