Limits
- Processes do not survive a pause. A paused workspace keeps its disk, not its processes.
opencode servestarts 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-jobruns keeps the workspace awake, up to--max-minutes(default 120, at most 1440).maxAwakeHourspauses 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.rebuilddoes 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.
maxRunningis 10 by default. A connect past the limit fails withN/M workspaces already running. A workspace fromrun --newcounts too. - One task at a time in a checkout. A second
runinto a workspace where a task isrunningorwaitingfails. Give it its own checkout with--worktreeor--new. See 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. - File copy limits.
cf-opencode cpmoves 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 onworkers.dev. A copy wakes a paused workspace. An agent in a workspace cannot start a copy. See Move a file between workspaces. - Local OpenCode must be version 2 for
connect. - Sessions list.
cf-opencode sessionsshows 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, Workers AI, Browser Run and R2.
How to keep costs low:
- An idle workspace stops after
idlePauseMinutespluswarmMinutes. Lower these to stop sooner. maxAwakeHoursstops 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 starta--max-minutesnear 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 withcf-opencode store rm <name>. - Run
cf-opencode uninstall --yesto 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-opencodestay, exceptinstall.json.
Containers need the Workers Paid plan.