Skip to content

Add idea: durable execution as a CF-native primitive - #34

Open
rkoster wants to merge 1 commit into
mainfrom
ideas/durable-tasks-for-cf
Open

Add idea: durable execution as a CF-native primitive#34
rkoster wants to merge 1 commit into
mainfrom
ideas/durable-tasks-for-cf

Conversation

@rkoster

@rkoster rkoster commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Argues that CF should add a durable execution primitive, grounded in what the agent frameworks surveyed in this repo actually need \u2014 and notably, what none of them ship.

The gap: cf run-task runs once (no checkpoint, resume, retry, or schedule); app instances run forever with no durable per-instance state. Durable execution lives in between, and CF has nothing there. Every framework surveyed delegates durability to a substrate: ADK exposes replay-safe primitives but no engine, OpenAI Agents SDK relies on external Temporal/Dapr, Microsoft AF binds to Azure Durable Task, LangGraph/CrewAI/LlamaIndex all expose pluggable checkpointers.

Key positions:

  • CF owns the lifecycle; a bound service owns the state. Apps already checkpoint correctly today (LangGraph PostgresSaver against a bound Postgres). CAPI never becomes a database \u2014 it stores a pointer.
  • The missing verb is "I've checkpointed \u2014 release my container, wake me on event E or at time T." A suspended execution should hold no container; today an agent awaiting human approval for three days occupies a full app instance.
  • Tasks are the right execution primitive but the wrong identity primitive. Diego Tasks are already short-lived and release their container on exit \u2014 the right shape for a slice between suspensions. But task GUIDs are minted per run and tasks can't be addressed, so identity moves to a durable CAPI resource above them (mirroring Temporal's workflow-execution vs. workflow-task split).
  • One API per cell, not per container. The Loggregator agent is the precedent; a durable-execution API is a thin stateless control call, unlike a Dapr sidecar which must be per-container. Callers authenticate via mTLS with the Diego instance identity cert, reusing RFC-0055's identity extraction.

Explicit non-goal, with evidence: no HTTP-addressable resume. An evidence table across Temporal, LangGraph, LlamaIndex, CrewAI, OpenAI Agents SDK, Letta, and Cloudflare shows durable executions are near-universally addressed by stable ID through an always-on service, never as a network endpoint \u2014 Cloudflare being the sole exception, because a Durable Object is simultaneously compute, state, and addressing unit. This avoids needing a Knative-activator-style request-holding component.

Deliberately argued on framework evidence alone rather than as a counterproposal to the sibling Dapr ideas (#32, #33).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant