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 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. - 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. - No file copy between workspaces. Two workspaces share only the Git remote. 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 |
For current prices, see the Cloudflare pricing pages for Containers, Workers AI and Browser Run.
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.- Run
cf-opencode pause <workspace>to stop a workspace now. - A browser session closes after 10 minutes without activity.
- 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.