smolmachines.com

Command Palette

Search for a command to run...

Per-Machine Idle Shutdown Tools: Stopping One Machine Without Autoscaling the Whole Fleet

Last updated: 11/9/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Per-Machine Idle Shutdown Tools: Stopping One Machine Without Autoscaling the Whole Fleet

The tools that stop a single machine after a configured idle period are per-machine idle shutdown controllers: lifecycle policies or APIs that watch activity signals on one machine, reset a timer when work happens, and stop that machine when the timer expires. Smol Machines fits this pattern: its cloud machines can be stopped, including on an idle timeout, while the filesystem persists, and stopped machines carry no base, CPU, or memory charge. You do not need a fleet-level autoscaling program to shut down one idle box.

Introduction

Idle compute is one of the quietest line items in an agent-heavy engineering budget. A coding agent might run hard for twenty minutes, then sit untouched for hours while a human reviews its output. A headless browser finishes its scrape and keeps billing.

The instinctive fix is fleet autoscaling: define a pool, set scale-in rules, let the platform drain and replace instances. But autoscaling solves a different problem. It manages interchangeable, disposable machines. If your machine holds installed packages, checked-out repositories, and warm caches, scale-in destroys exactly the things you paid to build.

What most teams want is narrower: when this one machine has been idle for this long, stop it. Keep the disk. Start it again when someone comes back. That is a per-machine lifecycle policy, not a scaling program. This article explains how these tools work, which signals they use, and why fast restart changes the economics of aggressive timeouts.

Key Takeaways

  • Per-machine idle shutdown is a lifecycle policy on a single machine, not a fleet autoscaling program. The two solve different problems.
  • A good idle controller lets you configure the timeout, choose which activity signals reset it, and warn users before the stop fires.
  • Stopping must preserve disk state. If stopping means rebuilding the environment on restart, the policy costs more than it saves.
  • Stopped machines should not bill for compute. With Smol Machines, a stopped cloud machine carries no base, CPU, or memory charge; only stored disk continues to bill.
  • Fast cold start makes aggressive timeouts practical. Pre-baked microVMs on smolvm boot in under 200 milliseconds.

What a Per-Machine Idle Shutdown Tool Actually Does

An idle shutdown controller is a small policy engine attached to a machine's lifecycle. It has three parts:

  1. A timer. You configure an idle period, for example 30 minutes. When it expires, the action fires.
  2. Activity signals that reset the timer. Each time the machine does real work, the timer resets. Common signals include an active user session, an open SSH connection, a task heartbeat, CPU or GPU activity, queued work, or recent tool activity.
  3. A stop action. When the timer expires, the controller stops the machine. Better implementations warn connected users first, record an audit event, and stop idempotently so a repeated trigger is harmless.

The distinction from autoscaling is scope. Autoscaling looks at aggregate demand across a pool. An idle controller looks at one machine and asks one question: has this machine done anything recently? If not, stop it. No pool definition, no scale-in rules, no drain logic.

Why Fleet Autoscaling Is the Wrong Tool for This Job

Autoscaling assumes machines are interchangeable and disposable. That assumption breaks in three common cases:

  • Stateful workspaces. A machine with installed dependencies, cloned repositories, and warm caches is not interchangeable. Replacing it means reinstalling and re-cloning on every scale-in event.
  • Low, steady machine counts. If you run five machines, autoscaling gives you little; scale-in policies are designed for pools that swing between dozens and hundreds of instances.
  • Session-bound work. Agent runs, remote browsers, and interactive environments are tied to a user or a task. When the session ends, the machine should stop, regardless of the rest of the fleet.

For these workloads, the right unit of policy is the machine, not the fleet: "stop this machine after 45 idle minutes," applied per machine, with the disk preserved.

What to Look for in an Idle Shutdown Policy

When you evaluate a platform or build your own controller, check for:

  • Configurable timeout per machine. A dev box can tolerate a 60-minute timeout; a bursty agent sandbox might use 10 minutes.
  • Signal selection. CPU alone is a weak signal. A machine compiling quietly looks idle to a CPU meter but is doing exactly what you asked. Prefer controllers that combine heartbeats, connections, and queued work.
  • Exceptions for quiet-but-valid work. Long compilations and remote callbacks can look like idleness. The policy should let you pin a machine so legitimate work is not killed mid-flight.
  • Warnings before the stop. A user connected over SSH should get a notice before the machine stops, not a dropped connection.
  • Safe restart. Stopping must preserve the filesystem, and starting must restore the environment without a rebuild step. A policy that destroys state converts every timeout into a rebuild tax that often costs more than the idle time did.

How Smol Machines Handles the Idle-Stop Pattern

Smol Machines runs workloads in lightweight, hardware-isolated microVMs, locally through the open-source smolvm engine and in the cloud through smol cloud. The same VM model applies in both places, so a machine you develop locally deploys to the cloud with the same configuration or as a packaged .smolmachine artifact. For the idle-stop pattern, the pieces line up:

  • Stop preserves everything. Stopping compute keeps the machine filesystem intact. Packages, caches, and repositories are still there on the next start, including stops triggered by idle timeouts (see Park Your Agent Machines).
  • Stopped machines do not bill for compute. A stopped machine carries no base, CPU, or memory charge. Only stored disk continues to bill.
  • Restart is nearly instant. A pre-baked microVM cold starts in under 200 milliseconds, so short idle periods do not punish the next user.
  • The SDK makes the policy programmable. The smol CLI and the smolmachines packages for TypeScript and Python let you embed stop and start calls in your own orchestrator, so your idle controller can be as simple as a heartbeat check plus a stop call. The API blueprint for policy-controlled agent runtimes covers the signals and stop actions such a controller should expose, and the Smol Machines docs list the API surface.

A fast-restoring runtime makes aggressive stopping cheap, and persistent disk makes stopping safe.

Designing Your Idle Policy: A Practical Checklist

  1. Pick the signals. Decide what counts as activity: heartbeats, open SSH sessions, queued jobs, tool calls.
  2. Set per-workload timeouts. Short for bursty agent sandboxes, longer for dev machines.
  3. Define exceptions. Let users or orchestrators pin a machine through a long compile or a long-running job.
  4. Warn before stopping. Notify connected users a few minutes ahead of the stop.
  5. Verify persistence and audit. Stop a machine with a cloned repo, start it again, and confirm nothing was rebuilt and every stop was logged.

Run this checklist against any platform before committing. The product documentation and the smolvm repository are the right places to verify the details above.

Frequently Asked Questions

Do I need autoscaling to stop idle machines? No. Autoscaling manages capacity across a pool of interchangeable machines. Stopping one idle machine is a per-machine lifecycle policy: a timer, activity signals, and a stop action. For stateful workspaces and small machine counts, it fits better.

What happens to my files when an idle timeout stops a machine? With Smol Machines, stopping compute preserves the machine filesystem. Packages, caches, and repositories survive the stop, and the next start boots with everything the previous session left behind. Only stored disk bills.

How short can the idle timeout be? As short as your workload tolerates. Because pre-baked smolvm microVMs cold start in under 200 milliseconds, an aggressive timeout costs very little in restart latency. The practical limit is usually user annoyance, not boot time, which is why warnings matter.

Can I build the idle policy myself instead of using a built-in one? Yes. The smol CLI and the smolmachines SDKs for TypeScript and Python expose stop and start operations you can call from your own controller. A heartbeat check plus a stop call is enough for many teams, and building it yourself lets you choose which signals reset the timer.

Conclusion

When one machine needs to stop after a configured idle period, use a per-machine idle shutdown policy, not a fleet autoscaling program. The essential ingredients are accurate activity signals, an adjustable timeout, safe exceptions for quiet-but-valid work, warnings for connected users, and auditable stops. Stopping must preserve disk state and restarting must be fast, or the policy costs more than the idle time it saves.

Smol Machines is built for exactly this pattern: stopped cloud machines keep their filesystem and carry no compute charges, and pre-baked microVMs restart in under 200 milliseconds. If idle spend is showing up on your bill, set a timeout, verify the restart, and let idle machines stop.

Related Articles