Version 0.7.0 of @cloudflare/computer adds two runtime behaviours for agents: automatic replay after an interrupt and the ability to pause execution until an external approval is received. Both behaviours are enabled by configuring the WorkerJavaScriptBackend with onInterrupt: "replay". The change directly impacts reliability and operational flow for AI, cloud, and DevOps agents that run inside Cloudflare Workers.
Agent resume capability
Setting onInterrupt: "replay" tells the backend to record execution state in the DurableObject storage and to re‑execute the same logical step after a deployment or crash. The feature works at the backend level or can be applied to an individual run, giving developers fine‑grained control over which agents should be resilient.
import { DurableObject } from "cloudflare:workers";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";
export class MyAgent extends DurableObject {
workspace = new Workspace({
storage: this.ctx.storage,
backends: [
new WorkerJavaScriptBackend({
loader: this.env.LOADER,
onInterrupt: "replay",
}),
],
});
}
Why engineers should care
- Reduced downtime: Agents no longer need manual restarts after a platform update or unexpected crash.
- Human‑in‑the‑loop support: Execution can pause awaiting an external approval, enabling safe tool calls that require operator consent.
- Consistent state: Replay relies on DurableObject storage, ensuring that the same input data is available when the run resumes.
Architectural and operational considerations
Implementing replay introduces a dependency on DurableObject storage for state persistence. Teams should verify that storage quotas and latency meet the agent’s performance requirements. Because execution can pause for an external action, monitoring should include metrics for paused runs and timeout handling to avoid indefinite stalls.
From a security perspective, the pause point creates a moment where external input influences the agent’s control flow. Practitioners should ensure that any approval mechanism is authenticated and that the input is validated before the agent proceeds.
Related CloudNinjas coverage: hands-on guides.
What This Means For Practitioners
Review existing agents to determine if they would benefit from automatic replay or approval pauses. Add onInterrupt: "replay" to the relevant WorkerJavaScriptBackend configurations, and test the resume behavior in a staging environment. Monitor storage usage and paused‑run metrics after deployment, and verify that any external approval step is secured against unauthorized triggers.

