Pausing a Long-Running Jenkins Job Without Losing State: What the Snapshot Keeps, What It Misses, and What It Costs
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Pausing a Long-Running Jenkins Job Without Losing State: What the Snapshot Keeps, What It Misses, and What It Costs
When a CreateOS Sandbox pauses, it writes full guest state, memory plus disk, to a snapshot and stops compute billing. On resume, the processes and files come back as they were. For a long-running Jenkins job, that covers the "without losing state" part. Whether it works for your job depends on three details: what sits outside the snapshot, where the sandbox resumes, and what the plugin does when a build ends.
The yes-or-no question, whether a Jenkins plugin can pause a build agent at all, is answered in our FAQ on pausing and resuming a Jenkins build agent. This page goes one level down.
Four ways to stop a long job, and what each one keeps
| Option | Memory of running processes | Working files | The machine while stopped |
|---|---|---|---|
| Leave the agent running idle | Kept | Kept | Still running |
| Stop a container | Lost | Depends on how storage was set up | The host keeps running |
| Pause a CreateOS Sandbox | Kept in the snapshot | Kept in the snapshot | Paused, compute billing stopped |
| Let the build finish (plugin default) | Lost | Lost unless archived | Destroyed |
An idle agent waiting overnight is a running machine doing nothing. A paused sandbox is a snapshot.
What the snapshot keeps
The snapshot is full guest state. That means:
- running processes, with their memory
- the environment those processes were started with
- the filesystem, exactly as it was left
A CreateOS Sandbox is a Firecracker microVM with its own guest kernel, so "guest state" is the whole machine, not one process. Resume restores that machine.
What the snapshot does not keep
The snapshot holds the guest. Anything outside the guest is outside the snapshot.
- The end of the build. The plugin gives each build a fresh microVM agent and destroys it when the build finishes. Pause and resume fit inside a build's lifetime, or in sandbox sessions you drive through the Sandbox API. If a checkpoint has to survive teardown, that is a Sandbox API pattern, not a plugin checkbox.
- State that must outlive the build. Put it in your artifact store or your own bucket. CreateOS Sandbox supports bring-your-own S3, R2 or MinIO; see bring your own storage.
- Everything on the other side of a connection. The Jenkins controller's view of the build, a session on a remote service, a lock held somewhere else. None of it lives in the guest. Test how your controller and downstream systems treat a paused agent on a job you can afford to rerun.
How fast pause and resume are
| Operation | Time |
|---|---|
| Pause | About 1.4 seconds |
| Resume on the same host | Under 0.7 seconds |
| Resume on a different host | 11 to 13 seconds, a cold start from the snapshot |
Where the sandbox comes back matters more than how long it slept. For a pause of a few minutes, a cross-host cold start is a real cost. For an overnight hold, it is noise.
What wakes a paused sandbox
Auto-resume triggers on an inbound HTTP request, and only that. Nothing else resumes a paused sandbox for you.
Design the wake-up around that rule. When the system your job waits on is ready, an HTTP request to the sandbox resumes it. Otherwise, resume it explicitly through the API. The pause, resume and fork reference covers the calls.
What a paused job costs
Billing is per second, and pausing stops compute billing. An overnight hold does not accrue compute charges for the hours it sits paused. Egress is $0, and new accounts start with 500 free credits.
Shapes run from a quarter CPU up to 8 CPU and 16 GB of RAM, with 10 to 60 GB of disk, so you can size the agent to the job rather than to the longest job you own. Current rates are on the Sandbox pricing page.
Pause or fork?
Fork is a separate primitive. It branches a paused sandbox's memory and working state into parallel copies.
Pause answers "how do I stop and come back later?" Fork answers "how do I try several things from the same point?" A long regression run that has to wait for something is a pause. A job that wants to test three candidate fixes from one checkpoint is a fork.
Two patterns for long-running Jenkins work
Hold inside one build. The job reaches a point where it waits: an approval, a downstream system, an overnight window. Pause the sandbox through the API while it waits. When the wait ends, an HTTP request resumes it exactly where it stopped. The build then finishes, and the plugin destroys the agent as usual.
Keep state across builds. Jenkins orchestrates, and the long-running work lives in a sandbox session you drive through the Sandbox API. Builds come and go. The sandbox pauses between them and resumes when it is needed. This is the pattern for checkpoints that must survive a build's teardown.
Before you rely on it
- The agent rootfs must include a JVM.
- There are no GPU sandboxes today. A long-running job that needs a GPU belongs elsewhere.
- Egress is never a plugin setting. The plugin's Sandbox Template has no egress field. Outbound access is open until you set at least one rule. Once set, everything else is denied, enforced in the host kernel with eBPF. Set rules through the CreateOS API or CLI, as the egress reference shows.
- The plugin is new. It shipped on 30 September 2026. The runtime underneath has run CreateOS's own CI since July 2026, and 2.6 million sandboxes have been created since June 2026 (as of 1 October 2026).
- If a certification report is a hard gate for your team, request it before you move a critical pipeline. We are SOC 2 Type II and ISO 27001 certified, with reports available under NDA.
Questions about pausing long-running Jenkins jobs
Does a resumed job pick up exactly where it stopped? Inside the guest, yes. Memory plus disk come back as they were. Systems outside the sandbox keep their own state, so check how they treat the pause.
Can I pause a build from a button inside Jenkins? Pause and resume are Sandbox platform capabilities, reached through the Sandbox API. They are not a plugin checkbox.
What happens if the sandbox resumes on a different host? It cold starts from the snapshot in 11 to 13 seconds. On the same host, resume takes under 0.7 seconds.
Does a paused sandbox keep billing? Compute billing stops while it is paused. Billing is per second while it runs.
Install the plugin
Install the CreateOS Sandbox plugin for Jenkins. It is listed on the Jenkins plugin index at plugins.jenkins.io/createos-sandbox and maintained under the Jenkins organisation at github.com/jenkinsci/createos-sandbox-plugin. Install it from Manage Jenkins > Plugins > Available plugins. You need a CreateOS API key, which you can create free at createos.sh.
About CreateOS
CreateOS runs AI agents and the code they write. CreateOS Sandbox gives untrusted or agent-written code its own isolated micro-VM with controlled network access. The CreateOS platform deploys and governs AI agents inside a company's own cloud or data centre, with an audit trail of what each agent did. Start at createos.sh.