Per-Minute Agent Runtime Costs Across Cloud Coding Platforms
Token consumption and context growth drive the actual bill, not the advertised per-minute rate.

A team sets a monthly budget for a cloud coding agent, multiplies an advertised per-minute rate by expected usage hours, and then watches the actual invoice land nowhere near that number. The mistake sits upstream of the math: agent runtime cost is not one meter running at one rate, but two separately billed meters that move independently, scale on different variables, and respond to different levers. One meter tracks how many tokens a model consumes; the other tracks how long a compute environment stays active. They are frequently billed by different companies altogether, so a single line item never captures both. Comparing cloud coding platforms on a headline runtime rate, or on model price alone, misses half the bill in either direction, and the rest of this piece works through why.
The token meter
For most cloud coding agent workloads, the token meter is the large bill and the infrastructure meter is the small one, so cost control starts with understanding how tokens get charged. Claude Managed Agents bills on exactly two dimensions: tokens and session runtime. Every token, whether it's input, output, a cache write, or a cache read, gets charged at the same per-model rates as the standard Claude API, and Anthropic adds a separate $0.08 per active session-hour on top of that.
Anthropic's own worked example makes the proportion clear. In a one-hour session that consumes 50,000 input tokens and 15,000 output tokens, the session runtime charge turns out to be a small fraction of the total bill, with tokens accounting for the large majority of what the team actually pays. The runtime charge doesn't change based on which Claude model is doing the work, so model selection affects only the token side of the invoice. Model choice matters entirely on the token side.
Three things interact to drive token cost, and they compound rather than simply add. Model tier sets the base rate: output tokens on Anthropic's most capable model cost ten times more than output tokens on the lightest current-generation tier, so switching tiers on an otherwise identical one-hour session produces a real dollar saving while the runtime charge stays exactly flat. Context growth compounds that rate over the life of a session, because agent loops resend the accumulated conversation history with every step, so token consumption grows faster than the task itself grows, a dynamic that a per-minute framing hides completely. Compaction adds a third layer of cost: long-running agents that hit context limits trigger compaction events, and each one consumes a substantial block of tokens just to summarize the session so far, which can account for a meaningful share of total token spend on extended tasks. Before a task even starts, you shouldn't ask how many minutes the agent will run. It's which model is assigned to the work and how its context gets managed as the session grows.
How prompt caching changes the token meter's behavior
Caching is the strongest lever available on the token meter, but it only pays off under specific conditions, and misapplying it means paying the write cost without ever earning back the discount. Anthropic's caching multipliers apply on top of the base input price: a short-lived cache write costs more than a standard input token, a longer-lived cache write costs even more, and a cache read costs a fraction of the standard input rate. The economics only work out when cached content gets pulled often enough to earn back the write cost.
A cache read on Sonnet costs a fraction of the uncached input rate, which amounts to a steep discount on any content that gets retrieved repeatedly across a session or across sessions. How many retrievals it takes to break even depends on which cache lifetime a team chooses: a short-TTL write recovers its cost after a handful of reads within its window, while a long-TTL write needs more retrievals before it starts saving money. That tradeoff points to where caching helps most: sessions built on a consistent system prompt, agents that reference the same codebase or documentation across many runs, and team-wide deployments where several agents pull from shared context. It helps least on short one-off tasks, highly variable prompts, or sessions that never repeat similar inputs.
Two teams running the identical agent on the identical task with the identical model can land on very different token bills, purely because one team structured its sessions to take advantage of caching and the other didn't. Caching effectiveness tracks workload patterns closely: teams running many agent tasks against the same codebase and the same system prompts see the biggest payoff, since cached context carries across sessions. Cloud agent platforms such as Replicas are built to run that kind of repeated, structured work at scale.
The infrastructure meter
The infrastructure meter doesn't measure how much useful work an agent did. It measures elapsed active compute time, and that clock runs whether the agent is making real progress or stuck looping on the same failed approach.
Each Harness runs inside its own isolated microVM, using Kata Containers with Cloud Hypervisor by default and gVisor available as an alternative, giving every agent task its own dedicated kernel.
The two meters don't move in lockstep, and that independence is the point. A session can sit idle on the token side, since Anthropic excludes idle time from token billing under its session rules, yet the infrastructure environment can still be running and accruing compute cost. The reverse can happen too. Northflank Harnesses handle this by supporting both persistent and ephemeral environments: persistence is on by default, which keeps a workspace warm between sessions and cuts startup latency for long-running or multi-session tasks, but it can be turned off at creation for throwaway environments that only need to exist for a single task. Ephemeral environments limit idle compute waste because they tie cost closely to active task duration, while persistent environments trade some standby cost for faster starts and preserved state. Replicas runs on a related isolated-VM model: each agent run gets its own sandboxed environment, preloaded with a team's dependencies, able to install packages, run services, and verify its own work, triggerable from Slack, Linear, GitHub, or GitLab, with output returned as a pull request. Replicas bills infrastructure runtime separately from token costs, since tokens are paid directly to the model provider through the user's own API key, which makes it a clean illustration of how the two meters interact in practice and why treating them as one number produces budgeting errors.
The two meters across the main cloud coding platforms
Looking at actual platforms through the two-meter lens shows cost structures that a subscription price alone would never reveal.
Claude Code cloud sessions run in a fresh Ubuntu 24.04 VM with the connected GitHub repository cloned and common toolchains, Docker, PostgreSQL, and Redis pre-installed. Sessions are included in Claude Pro at $20 a month, as well as Max, Team, and Enterprise plans, and they count against plan usage limits rather than generating a separate per-session infrastructure charge. On the token side, standard Claude API rates apply, so model tier drives that part of the bill directly. On the infrastructure side, Anthropic charges $0.08 per active session-hour, billed down to the millisecond, and only while the session status reads "running"; idle time, rescheduling, and terminated sessions accrue nothing. The tradeoff for that simplicity is structural: there's no shell access into the VM, Anthropic reclaims the machine once a session goes idle, and sessions are scoped tightly to a single task by design. Teams can trigger sessions from claude.ai/code, the Claude apps, the claude CLI's /schedule command, @Claude in Slack, or scheduled routines tied to GitHub events.
Codex cloud runs each task on its own VM, inspecting the repository, installing dependencies and tools, and testing the workflow before the environment gets published. A task keeps its files, including uncommitted changes, and saved VM state stays recoverable for up to seven days after the last turn. Work can start from Codex on the web, the ChatGPT desktop app, the ChatGPT mobile app, or, for Business and Enterprise workspaces, from @ChatGPT in Slack or Microsoft Teams. Code reviews and the Linear, GitHub, and GitLab integrations still run on OpenAI's earlier container environment. Published documentation doesn't break out a separate per-session-hour infrastructure rate for Codex cloud the way Anthropic states its $0.08 figure, so that half of the picture stays less visible than it does for Claude Code.
Compute bills per second across CPU, memory, and disk, and pausing a Harness stops that billing entirely while preserving the workspace. Because Northflank doesn't sit between the agent and the model API, token costs and caching decisions stay entirely in the team's hands, and the two meters end up billed independently by two different parties, which makes the overall cost structure among the most transparent of the platforms covered here. Teams that want to run Harnesses inside their own cloud account can do so on AWS, GCP, Azure, Oracle, or CoreWeave, in which case infrastructure cost follows that provider's own rates instead.
Cursor works differently again, billing through a two-pool usage model: one pool covers Cursor's own models with generous limits, and a second pool covers third-party frontier models billed at API rates, so expensive models drain their pool faster than cheaper ones. Infrastructure execution happens either locally or inside Cursor's managed environment depending on the workflow, and the published material gives far less detail on that infrastructure billing than Anthropic or Northflank provide, so no per-session-hour rate can be stated for it. At team scale, Cursor's per-user pricing diverges substantially from Claude Code's team pricing, a gap to factor in before comparing the two on headline numbers alone.
Where token costs diverge
Model tier is the single biggest lever on the token meter, and per-task token consumption varies enough between agents that a subscription price tells a team almost nothing about what a given workload will actually cost. The spread between output token prices on Anthropic's most capable model and its lightest tier is large enough that the choice of model multiplies through every single token in a session, not just the expensive ones.
Model price isn't the only variable hiding inside a bill. One developer community test ran the identical multi-file refactor task, with the identical developer, through two different agents, and token consumption differed by a factor of more than five between them. Same task, same person, strikingly different bills, driven entirely by how each agent managed its own context and reasoning steps.
Subscription pricing can mask this divergence at the entry tier, where monthly costs across platforms look similar enough to seem interchangeable. That similarity disappears at team scale, where per-user pricing diverges significantly between platforms, and that divergence compounds with per-task token burn rates that no subscription price discloses. There's also a risk the token meter can't self-correct: it charges the same rate whether an agent is doing precise, useful work or looping unproductively on a dead end, so a sudden spike in token spend is a diagnostic signal about agent behavior, not just a billing surprise to absorb. The fastest available control is choosing a lighter model tier for tasks that don't need maximum capability, and pairing that choice with caching for any context that repeats across sessions compounds the savings further.
How harness-agnostic infrastructure decouples the two meters
Treating infrastructure and model choice as two separate decisions, rather than one bundled purchase, gives teams the most control over cost. A platform that bundles both meters into a single product makes onboarding simpler, but it locks a team in on both sides at once: swapping models means changing infrastructure, and tuning the infrastructure environment can limit which models are even available to run on it.
A harness-agnostic infrastructure layer, one built to run Claude Code, Codex, Cursor, OpenCode, or other agents interchangeably, keeps model choice open as token pricing shifts over time. Model prices change often enough that the ability to move to a better-priced or better-performing model without re-provisioning infrastructure is a real structural advantage, not a minor convenience. Replicas applies the same logic at the level of team workflow: engineering teams route tasks to whichever agent, Claude Code, Codex, Cursor, or Opencode, fits the job best, triggered from Slack, Linear, GitHub, or GitLab, with each run sandboxed in its own VM preloaded with the team's dependencies, and full analytics attributing every minute of runtime back to its source, harness, model, and credential.
Billing infrastructure by the second or the millisecond means idle time genuinely costs nothing: pausing an environment between tasks stops the infrastructure meter without destroying the workspace, which is the infrastructure-side equivalent of the idle-time exclusion built into Anthropic's session billing. That property matters more as fleets of agents scale up. Anthropic's $0.08 per session-hour runtime fee is a rounding error for a single agent, but multiplied across dozens or hundreds of concurrent long-running sessions, it turns into a meaningful recurring cost. The infrastructure decision isn't a side concern for engineers to sort out quietly. It determines directly which cost lever an engineering leader has available once the token bill starts climbing, and that's the problem the next section works through.
Measuring and controlling both meters
Understanding that there are two meters only pays off once a team actually instruments both of them, and most tooling available today exposes one meter, or neither.
Instrumenting the token meter means tracking consumption at the level of the model call itself, not the monthly total. Tokens per task type reveal problems that tokens per month hide, since a spike tied to one specific kind of task is diagnostic information before it ever becomes a budget crisis. Cache hit rates deserve the same scrutiny: a low hit rate on workloads that should be caching a shared system prompt or shared documentation points to a recoverable optimization sitting unused. Compaction events in long-running agents are worth counting too, since each one carries a measurable token cost that shorter sessions or tighter context limits can reduce directly.
Instrumenting the infrastructure meter means watching the session and the environment, not the fleet-wide total. Active compute time against wall-clock time per session is the clearest early signal: a large gap between the two means idle compute sitting around that could be paused. For teams running agents at fleet scale, infrastructure cost needs to trace back to the specific agent, harness, and task that generated it, not just to a team budget line. Replicas provides that kind of attribution directly, with analytics down to the source, harness, model, and credential for every minute an agent runs, giving engineering leaders a way to watch both meters at once and manage each on its own terms. A single per-minute number was never going to capture a cost built from two meters moving independently, so the only way to budget accurately is to watch both.


