---
title: "Limits and costs"
description: "What a workspace cannot do, how snapshots expire, and what cf-opencode costs in your Cloudflare account."
---

> Documentation Index
> Fetch the complete documentation index at: https://cf-opencode.system3inference.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Limits and costs

## Limits

- **Processes do not survive a pause.** A paused workspace keeps its disk, not its processes. `opencode serve` starts again on resume. A dev server or a tmux session that you started does not.
- **A long job has a maximum run time.** A job that `cf-opencode-job` runs keeps the workspace awake, up to `--max-minutes` (default 120, at most 1440). `maxAwakeHours` pauses the workspace also while a job runs, and the pause stops the job.
- **A restore keeps the old tools.** A snapshot is the whole disk. A restore keeps the tools of the image it first booted, even after `cf-opencode upgrade`. `cf-opencode status <workspace>` says when the image is older. `cf-opencode rebuild <workspace>` moves it. `rebuild` does not carry packages that you installed outside `/home/user`. It stops a running agent.
- **A redeploy reaches a running workspace late.** The control code of a running workspace changes after its container next stops. Pause the workspace to move it sooner.
- **One container size per install.** The default is 2 vCPU, 6 GiB of memory and a 20 GB disk. Change it with `instance`.
- **A limit on running workspaces.** `maxRunning` is 10 by default. A connect past the limit fails with `N/M workspaces already running`. A workspace from `run --new` counts too.
- **One task at a time in a checkout.** A second `run` into a workspace where a task is `running` or `waiting` fails. Give it its own checkout with `--worktree` or `--new`. See [Run two tasks at once](https://cf-opencode.system3inference.dev/docs/guides/hand-off-a-task/#run-two-tasks-at-once).
- **The image has Node 22 and no compilers.** A workspace made before 0.3.0 has no Node until you run `cf-opencode rebuild <workspace>`. See [The workspace image](https://cf-opencode.system3inference.dev/docs/reference/image/).
- **File copy limits.** `cf-opencode cp` moves at most 4 GB and 200,000 entries in one copy. It runs at most 30 minutes in each workspace. A copy from this machine is one request, and Cloudflare accepts at most 100 MB in one request on `workers.dev`. A copy wakes a paused workspace. An agent in a workspace cannot start a copy. See [Move a file between workspaces](https://cf-opencode.system3inference.dev/docs/guides/hand-off-a-task/#move-a-file-between-workspaces).
- **Local OpenCode must be version 2** for `connect`.
- **Sessions list.** `cf-opencode sessions` shows at most 50 sessions per workspace.
- **A deploy needs Docker.** Wrangler builds the image on your machine on each deploy.

## Snapshot expiry

Cloudflare drops a snapshot 30 days after its creation or its last restore.

Three days before that, the Worker restores a paused snapshot for a few seconds. It has no internet access and starts nothing. This begins a new 30 days. A workspace that you leave for months keeps its disk.

`snapshotRefreshDays` sets the lead time. Set it to `0` to let unused workspaces expire.

`cf-opencode list` marks a snapshot that is less than two days from expiry with `!`. That means the refresh fails or is off. A `connect` saves it and starts a new 30 days.

A deleted workspace has no pointer to its old snapshot. Cloudflare drops the data after 30 days. There is no snapshot delete API.

## Costs

Everything is billed to your Cloudflare account. cf-opencode has no fee.

| Item | Billed as |
| --- | --- |
| The Worker and Durable Objects | Workers Paid usage |
| Containers | Compute while a container runs, including the warm period after an idle pause |
| Workers AI models (`@cf/...`) | Workers Paid usage |
| Third-party models through AI Gateway | AI Gateway credits (Unified Billing) |
| Browser sessions | Per browser hour, through Browser Run |
| The store (`store`, off by default) | R2 storage per GB-month and operations; no egress fee |

For current prices, see the Cloudflare pricing pages for [Containers](https://developers.cloudflare.com/containers/pricing/), [Workers AI](https://developers.cloudflare.com/workers-ai/platform/pricing/), [Browser Run](https://developers.cloudflare.com/browser-run/) and [R2](https://developers.cloudflare.com/r2/pricing/).

How to keep costs low:

- An idle workspace stops after `idlePauseMinutes` plus `warmMinutes`. Lower these to stop sooner.
- `maxAwakeHours` stops a workspace that is awake too long, even while it works or a long job runs.
- A long job keeps the workspace awake. Give `cf-opencode-job start` a `--max-minutes` near the time that the job needs.
- Run `cf-opencode pause <workspace>` to stop a workspace now.
- A browser session closes after 10 minutes without activity.
- Files in the store stay until you remove them, also after a workspace is deleted. List them with `cf-opencode store`. Remove one with `cf-opencode store rm <name>`.
- Run `cf-opencode uninstall --yes` to delete the Worker, the container application and the images. Snapshot data stays up to 30 days; Cloudflare has no API to delete it. Files in `~/.cf-opencode` stay, except `install.json`.

Containers need the Workers Paid plan.

Source: https://cf-opencode.system3inference.dev/docs/limits/index.mdx
