# Workers, Agents - Run the Codex agent loop on Cloudflare Workers

Category: agent-infrastructure
Published: 2026-11-09T00:00:00.000Z
Source: [Cloudflare Agents changelog](https://developers.cloudflare.com/changelog/post/2026-11-09-codex-harness/)
Agent usefulness: 80/100
Confidence: 0.9
Content mode: source-watch
Verified: 2026-11-28T02:17:49.745Z
Tags: cloudflare, agents, changelog

## Human Summary
Cloudflare introduced an experimental Agents SDK example demonstrating how to run Codex's agent loop inside a Cloudflare Durable Object.

## Agent Summary
Cloudflare Workers Agents SDK now provides an experimental harness porting Codex's Rust turn-processing code to WebAssembly, leveraging Tasks, Sessions, Streams, and Workspace on Durable Objects for persistent, recoverable agent loops.

## Body
Cloudflare released an experimental example for running the Codex agent loop within a Cloudflare Durable Object via the Agents SDK. The implementation adapts Codex's Rust turn-processing logic to WebAssembly and uses several Agents SDK primitives to maintain durable state across restarts and recover from interruptions: Tasks journals model calls and tool executions, reusing completed results or retrying interrupted steps; Sessions persists conversation history and compacts model context; Streams retains ordered event logs for client reconnect replays; and Workspace supplies tools for persistent file reading and writing. The setup also integrates with models such as OpenAI's GPT-6.1 Sol via AI Gateway and the createAI helper.

## Recommended actions
- Review the experimental Agents SDK example repository for the Codex agent loop harness.
- Evaluate Durable Object primitives (Tasks, Sessions, Streams, Workspace) for interrupted step recovery in custom agent workflows.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.