An agent can be available all day and work only in bursts. That continuity is convenient for users: their context, files and work remain available. For the team paying for infrastructure, another question follows. What stays reserved while the agent waits?

In an analysis published on November 16, Google examines this problem for coding-agent sessions on Kubernetes. Its model compares sessions retaining resources with environments suspended between prompts. This is a vendor analysis with stated assumptions, not a measurement of your team’s savings.

AI agent costs extend beyond model calls

A team can track tokens carefully and overlook the capacity reserved around the agent: tool execution, workspace, storage and supporting services. Model spending alone does not describe the cost of the whole system.

The useful distinction is between a session and its execution environment. The session represents continuity of work and conversation. The environment supplies the resources that perform actions. Preserving continuity does not necessarily require keeping the same compute capacity running permanently. Separating the two does require knowing what must be saved and restored.

Files, running processes and open connections are different kinds of state. A restart that restores a directory but loses an important process is not equivalent to keeping a session active. Define what users must recover before comparing prices.

An example of reserved capacity, not a bill forecast

Consider an entirely fictional setup: 10 sessions each reserve 1 vCPU for 8 hours. That is 80 vCPU-hours of reserved capacity. If each performs work for only 40 minutes, combined active time at that same capacity represents about 6.7 vCPU-hours.

The gap makes waiting visible. It does not show that the difference can be removed from a bill. Peaks, spare capacity, storage, permanent services and actual pricing still matter. Sessions may wait together and become active together. The daily average does not size that peak.

This is an illustrative calculation without prices or a real benchmark. It separates two easily confused observations: activity is low, and billable resources can actually be released.

Three ways to handle waiting

Trade-offs to test before migrating
ApproachWhat to examineRisk to measure
Keep the environment activeReserved capacity and whether sharing it preserves service quality.Paying for long availability and little work.
Stop and reconstructState stored outside the process and the restart procedure.Lost continuity or excessive restart delay.
Suspend and restoreState actually captured, permanent-service costs and recovery capacity.More complexity than savings justify at this scale.

This is an Onyx decision framework, not a comparison of products we tested. A small team may benefit from keeping a simple architecture. A large, intermittent fleet may justify deeper investigation. The number of open sessions alone does not decide.

Google’s analysis also shows that comparisons change with CPU guarantees and resource sharing. Compare equivalent service levels. A cheaper option that slows tasks more may still meet requirements, but that trade-off should be explicit.

Measure a week before moving the fleet

Start with useful records: open sessions, simultaneously active tasks, inactive periods and acceptable restart delay. Examine busy hours as well as averages.

Include failures. A restart that duplicates an action or loses work can cost more than the saved waiting time. A small pilot should test continuity, error recovery and simultaneous returns. Access permissions need their own checks, as our article on AI agent permissions explains.

A useful measure is cost per completed, verified task, alongside response time and failure rate. Include the model, infrastructure and operations within a stated scope. A smaller compute bill that causes more human intervention deserves an overall assessment.

Before asking how many agents a cluster can host, ask what must remain available between tasks. That answer identifies what could be paused. Measurements then show whether pausing is worthwhile.