Skip to content

Blog

How to Avoid Idle Cloud Bills When Running AI Coding Agents

Coding agents spend most of their time waiting. Compare idle rules and rates for Statefold, Amp, Devin, OpenHands, Replicas and Docker Sandboxes.

Last updated: November 2026

The short answer: a coding agent spends most of its time waiting on a model, a test suite, a CI run or you, so the way to avoid idle bills is to run it on a sandbox that sleeps on its own and bills nothing while asleep. Pick a runner with a published idle rule, per-second or per-minute billing, and wake triggers so the agent resumes with its history when there is work. Statefold bills per second only while the machine runs, from $0.10 an hour, and "a sleeping thread costs nothing." It runs Codex, Claude Code, OpenCode, Pi and Gemini CLI on your own subscriptions and keys with no markup, so the only thing it adds to your model bill is sandbox time.

Idle rules and rates compared

RunnerWhat stops the meterIdle ruleRate
StatefoldA sleeping thread costs nothingSandbox runs while the agent works, then sleeps$0.10 to $0.55 an hour, billed per second
AmpA paused orb costs nothingPauses after 5 minutes without agent work and 20 minutes without interaction$0.08 to $2.13 an hour, billed by the minute
DevinSleeping sessions do not consume usageSleeps after 5 minutes of inactivity by default; 30 minutes on Windows or GPU machinesPlan quota, then on-demand credits
OpenHands on DigitalOceanPaused session stops compute charges, storage still billedPauses after 15 minutes without activityCPU used, peak memory and storage
ReplicasSleeping and archived workspaces use no creditBilled only while awake, with a one-minute minimum per session$0.004 to $0.016 per minute
Cursor Cloud AgentsNo charge for idle wall clock time, per a forum answerThe VM spins up for the run and does not keep running in the backgroundTokens at API pricing plus setup runs
Codex CloudNo separate VM charge at launchCloud tasks continue while your computer is asleepCounts against ChatGPT plan limits and credits

How do we avoid high cloud bills when AI coding agents sit idle between tasks?

Stop paying for wall-clock time and pay for working time instead: use a runner that pauses the sandbox automatically, bills nothing while paused, and wakes it on an event. Idle waste comes from machines that stay up while the agent waits, and a warm pool or always-on VM is the most expensive version of that. The Blaxel guide on keeping sandboxes warm points to AWS Lambda provisioned concurrency as an example: the idle capacity charge is $0.0000041667 per GB-second on x86, billed continuously from the moment it is enabled until it is disabled.

Why coding agents idle so much

An agent turn alternates between short bursts of work and long waits: a model call, a test suite, a CI run, a reviewer, a human who has gone to bed. A thread that opens a pull request, waits for CI, fixes a failure and waits for review can span hours while the agent works for minutes. Any billing model that meters the whole span charges for the waiting.

Five rules that keep the bill close to working time

  1. Require automatic sleep. Pick a runner that pauses without you doing anything. Amp pauses an orb 5 minutes after the agent finishes or 20 minutes after your last interaction, and Devin sleeps a session after 5 minutes of inactivity by default.
  2. Confirm that sleeping is free. Pausing is not enough if storage keeps billing. OpenHands on DigitalOcean says a paused session stops compute charges but still pays for storage, and stopping the session deletes the sandbox and its storage charges.
  3. Wake on events, not on polling. A keep-alive ping or a sleeping agent you have to nudge both cost something. A Statefold thread wakes on a CI check finishing, a reviewer comment, an @statefold mention on GitHub, an assigned Linear issue, a weekday 9:00 schedule or an API call, so the machine only runs when something happened.
  4. Size to the task. Rates scale with machine size. Statefold's standard-1 is $0.10 an hour and standard-4 is $0.55, and a thread can move to a bigger machine when it needs more memory, with the new rate applying from then. Amp's guidance is to start small when unsure.
  5. Set alerts and caps. Replicas sends usage alerts at 50%, 80%, 100%, 150% and 200% of included credit and can put running workspaces to sleep within about a minute at a usage limit without deleting anything. Statefold emails at 20% remaining and at zero, and when credit runs out the running turn gets up to 10 more minutes before the sandbox sleeps.

A worked example with real rates

Statefold's pricing page estimates 40 hours a month on standard-3 at $12.00 (40 hours at $0.30 an hour). Keeping that same machine running around the clock for a 30-day month would bill 720 hours at the same $0.30 an hour, which is 18 times as many billable hours. The difference is the idle time you stop paying for. Model tokens are on top in both cases and, on Statefold, bill your own subscriptions and keys.

Idle tails add up too. Amp keeps an orb awake for 20 minutes after your last interaction, billed by the minute at the size's hourly rate. Small once, large across hundreds of threads, which is why the pause rule matters as much as the hourly rate.

What the idle rules look like at each runner

Statefold

Statefold gives every thread its own sandbox, starting on standard-3 (2 vCPU, 8 GiB, 16 GB disk, $0.30 an hour). Credits pay for sandbox time, billed per second while the machine runs, and a sleeping thread costs nothing until a message or an event wakes it. The container is asleep when idle, with a snapshot of the workspace, and the thread keeps its history when it wakes.

MachineSizePer hour
standard-10.5 vCPU, 4 GiB, 8 GB disk$0.10
standard-21 vCPU, 6 GiB, 12 GB disk$0.20
standard-3 (default)2 vCPU, 8 GiB, 16 GB disk$0.30
standard-44 vCPU, 12 GiB, 20 GB disk$0.55

Plans are $10, $50 or $100 a month, each granting its price in credits. Top-ups start at $10 and never expire, and linking GitHub gives a $3 starter credit (about 10 hours on the default machine, no card). Statefold does not publish the idle timeout before a thread sleeps, snapshot storage pricing or wake latency.

Amp

Amp lists six orb sizes with 60 GB of disk each: a1.tiny at $0.08 an hour up to a1.xxlarge at $1.32, plus an a1.3xlarge at $2.13 for Gigawatt subscribers and Enterprise workspaces. Usage is billed by the minute and a paused orb costs nothing. An orb pauses after 5 minutes with no agent work and 20 minutes with no interaction. A dev server the agent leaves running does not keep the orb awake by itself.

Devin

Devin does not consume usage while a session sleeps, and a session sleeps after 5 minutes of inactivity by default, or 30 minutes on Windows or GPU machines. Enterprise customers can ask their Cognition account team for a different timeout between 5 and 120 minutes. Devin also does not consume usage while it waits for your reply, waits for a test suite or clones a repository, apart from the few units needed to keep the VM running.

OpenHands

On the DigitalOcean backend, OpenHands pauses a session after 15 minutes without activity and bills CPU used, peak memory and storage. In its enterprise docs, Idle Time pauses a sandbox and releases CPU and memory, and Deletion Time permanently deletes a paused conversation and its storage. Both are set in seconds, and the docs give no default values. OpenHands does not publish cloud prices on its homepage.

Replicas

Replicas bills per minute by workspace size: small (2 vCPU, 8 GB) at $0.004 a minute, large (4 vCPU, 16 GB) at $0.008 and ultra (8 vCPU, 32 GB) at $0.016, with an overage rate 1.5 times higher. Workspaces use credit only while awake, and each session, including a wake, has a one-minute minimum. The $50 Developer plan includes $50 of usage and warm pools and warm hooks. The billing docs give no idle timeout.

Docker Sandboxes, Cursor Cloud Agents and Codex Cloud

Docker Sandboxes are free to run locally, and cloud compute is metered by the second from $0.07 an hour (1 vCPU, 2 GB) to $1.12 (16 vCPU, 32 GB). Docker does not publish an idle timeout or how a stopped cloud sandbox is billed.

Cursor Cloud Agents are billed at API pricing and need on-demand usage enabled, with about $2 of headroom under your hard limit before a run starts. A forum answer says you are not charged for idle wall clock time.

Codex Cloud has no separate VM charge at launch. Model usage counts toward your Codex limits and credits, and Codex Cloud is not included with Free or Go. Here the cost to watch is token usage, not sandbox hours.

What coding agent runners support multiple AI models while keeping idle infrastructure costs low?

Statefold, OpenHands and Docker Sandboxes each run several agents, and Statefold and Docker both bill model tokens to your own keys. Statefold supports five harnesses in one workspace and charges only for sandbox time, which sleeps for free. The table shows which agents each runner supports and who pays for tokens.

RunnerAgents and models it runsWho pays for model tokensIdle cost
StatefoldCodex, Claude Code, OpenCode, Pi, Gemini CLI, and one thread can delegate to another harnessYour own subscriptions and keys, no markupA sleeping thread costs nothing
OpenHandsClaude Code, Codex, Gemini CLI, OpenHands, plus open-weight models such as Kimi, DeepSeek and QwenYour chosen model provider; the DigitalOcean backend bills CPU used, peak memory and storage for the sandboxPaused sessions stop compute charges; storage still billed
Docker SandboxesClaude Code, Codex, Gemini, Kiro, Cursor, GitHub Copilot, Warp and moreBring your own keyCloud compute metered by the second; local sandboxes free
DevinDevin's own agentPlan quota, then on-demand credits; an eligible ChatGPT plan can be linked for GPT usageSleeping sessions do not consume usage
Cursor Cloud AgentsCursor's agentBilled at API pricing against plan usage, then on-demandNo idle wall clock charge, per a forum answer
Codex CloudCodexChatGPT plan limits and creditsNo separate VM charge at launch

Statefold's Codex, Claude Code, OpenCode, Pi and Gemini CLI all bill your own subscriptions and keys, so a team that mixes harnesses does not need a separate runner for each one. One Codex thread can have Claude Code plan and OpenCode review, and each child gets its own sandbox and history, so each sleeps independently.

Who should pick which

  • You mix harnesses and want sleeping sandboxes billed per second: Statefold runs Codex, Claude Code, OpenCode, Pi and Gemini CLI on your own keys, from $0.10 an hour.
  • You already use Amp: its orb sizes and 5 and 20 minute pause rules are fully documented, and a paused orb is free.
  • You want a vendor-managed agent with sleep and quotas: Devin sleeps after 5 minutes by default and does not consume usage while asleep.
  • You need an open-source core or open-weight models: OpenHands runs closed and open-weight models, and its enterprise setup lets you set the idle and deletion windows.
  • You want per-minute metering and warm pools: Replicas bills only while workspaces are awake and includes warm pools on its $50 plan.
  • You want to start free on your own machine: Docker Sandboxes run locally at no cost, and cloud compute is metered by the second.

Frequently asked questions

Does a sleeping Statefold thread cost anything?

A sleeping thread costs nothing until a message or an event wakes it. Usage is only the time a thread's sandbox runs. Statefold does not state a storage charge for sleeping threads.

What wakes a sleeping Statefold thread?

A CI check finishing, a reviewer comment, an @statefold mention on GitHub, an issue assigned in Linear, a weekday schedule or an API call. You can also send the thread a message.

What happens when my credit runs out?

The running turn gets up to 10 more minutes to finish, then the sandbox sleeps and the thread shows Limited. You get an email at 20% remaining and at zero, and a top-up from $10 lets queued work carry on.

Is per-second billing really cheaper than per-minute?

It matters most for short bursts. Replicas applies a one-minute minimum to each session, including a wake, so a 10-second wake bills a full minute. With per-second billing from Statefold or Docker's cloud sandboxes, a 10-second wake bills about 10 seconds.

Do I pay Statefold for model tokens?

No. Codex, Claude Code, OpenCode, Pi and Gemini CLI bill your own subscriptions and keys, with no markup.

How much does it cost to try Statefold?

Linking GitHub gives a $3 starter credit, about 10 hours on the default machine, with no card needed.

Next steps

  1. List how many hours a day your agents spend waiting. That is the bill you can remove.
  2. Check each runner's idle timeout and whether paused sandboxes still bill for storage.
  3. Start with the smallest machine that fits and move a thread up only when it needs more memory.
  4. See Statefold pricing for the machine table and plans, or try Statefold with the $3 starter credit.

Your next thread, shipped while you’re away

$3 of machine time to start. Bring your own subscriptions and keys.

Questions first? Ask in the Statefold Discord.