Skip to content
The AI Agent Factory

33.9 Limits, and how today's tools realize it

Approved by
Panaversity ·
12 min read

In everyday life. A new car comes with a manual that says what it cannot do: how much it can tow, how deep a river it can cross. A driver who reads that page has fewer bad days.

What you will learn. The limits of the stack you just built, how to build a subagent on a harness that has none, and the versions to check before you rely on any of this.

Why it matters. Chapter 32 called Pi Durable experimental. This page says what that means for this worker, in particular.

The limits

It is experimental, and pinned. Pi Durable 1.6.1 runs inside Cloudflare's agents 0.34.1, which supports one Pi minor version at a time. Pi 1.7.0 shipped on 27 November 2026, and you cannot use it here until agents supports it. Upgrade both together, on a branch, after the full test suite passes. This is rule 1 of Chapter 32's ten rules for depending on a small team.

Rolling back is not free. Moving a running worker from Pi 1.6 back to 1.5 breaks saved tool calls, because the format of a saved run changed. Treat a Pi upgrade like a database migration: plan it, test it on a copy, and do not undo it in a hurry.

Conversations cannot be deleted yet. Pi Durable 1.6 has no call to delete a conversation and its saved runs. Deleting the Durable Object's storage removes everything in it, and a local test shows Pi does not bring the run back afterwards (35.7). But it is a blunt tool: it removes the whole conversation, never one message. If a client asks you to delete their data, you need an answer before they ask. Data and deletion come back later in this part.

One object is one conversation. That is a strength for isolation, and a limit for anything worker-wide. Examples are a budget for the whole worker, a lock on one supplier's invoices across conversations, and a switch that stops every conversation at once. None of that belongs in a conversation's object. It comes later in this part.

No built-in subagents. Pi Durable has no subagent call: no built-in way for one agent to hand part of a task to a smaller agent. Cloudflare's Pi docs describe a pattern instead: submit the work to another session and ask to be notified, then park until that submission settles (SubmissionSettled).

Building a subagent with a fork

You can build one from parts Pi does have. A fork is a new session that starts from a copy of an existing conversation. To make a subagent:

  1. Fork the conversation, or start a new session, with a narrower tool list. A subagent that checks a supplier's tax number needs one read-only tool, not post_invoice.
  2. Give it its own budget: fewer turns, a lower spend limit.
  3. Let the parent wait for it to finish, as in the third kind of wait in 33.5, and read its result as a tool result.

The narrow tool list is the point. A subagent that cannot post cannot post twice.

The same worker on each foundation

The four jobs of this chapter are the same on every foundation. Save each step. Make a step with side effects safe to run twice. Wait for a person without paying for the wait. Accept a message once. What changes is who does each job.

Claude Managed Agents. Anthropic keeps the session and its history, and recovers it if a server fails. Waiting is built in: a session that waits for a person or a tool result is not billed for runtime (32.2). But your own tools, such as post_invoice, run on your servers. If your server crashes after the ledger posts and before it returns the result, the session does not know the post happened. The idempotency key is still your job, saved on your side before the call, exactly as in 33.3.

OpenAI Agents SDK. The SDK pauses well for a person: a tool can require approval, and you save the run as a RunState string and resume it later (32.6). It does not save each step. A crash in the middle of a run loses the run. So you add three things: a checkpoint before each tool call, a saved idempotency key, and an alarm that finds unfinished runs. You did exactly that in Lab 32, Task 4, and counted the lines.

The open stack. Pi Durable does all four inside the Durable Object. It saves a checkpoint per step. It uses replay: "safe" with api.memo per tool. A tool can return a waiting status. And operationId accepts each message once. What it does not do is listed above.

JobClaude Managed AgentsOpenAI Agents SDKPi Durable
Save each stepAnthropicYou add itBuilt in
A side effect runs once after a crashYour key, in your toolYour key, in your toolapi.memo in the tool, which you still write
Wait for a person without payingBuilt inBuilt in (RunState)Built in (a waiting tool)
Accept a repeated message onceYour keyYour keyoperationId

On all three, the idempotency key for an outside action is yours. No foundation can know that your bank's ledger posted a payment unless your tool tells it, with a key saved before the call.

How today's tools realize it

Checked on Sunday, 29 November 2026. Products change; check each line before you rely on it.

  • Pi Durable (@earendil-works/pi-durable 1.6.1, MIT, by Earendil). Checkpointed steps, replay: "safe" per tool, and api.memo() for values that must survive a rerun. Tools that return a waiting status with signals and a deadline. operationId for messages accepted once. Queued follow-ups and forks. Documentation ships in the package's README.md.
  • Cloudflare Agents SDK (agents 0.34.1, MIT). PiHarness and Lifecycle host Pi in a plain Durable Object, with its SQLite storage and its alarm. Documentation ships in node_modules/agents/docs/harnesses/pi.md.
  • Cloudflare Durable Objects. One object per name, SQLite storage, alarms, hibernation. Free plan while you learn. Not billed for time while hibernating.
  • Wrangler 4.x, for local runs (wrangler dev) and deploys.
  • Neon Postgres, free plan, for the worker's record.
  • Claude Haiku, through the model setting. Any model that pi-ai, Pi's model library, supports can replace it without changing the tools.

What we tested, and what we did not. On 29 November 2026 we ran the worker on Wrangler's local runtime with recorded answers. The wait survived a restart, and the crash after a payment posted once. A rejection reached the model as a result, a second answer was refused, and a repeated operation ID was not accepted twice. Some things we did not test, and you should check on your own account. These are a live model, the deadline path on a deployed worker, the dashboard's active time during a real wait, and deleting a conversation.

The invariant. Know what your stack does not do yet, pin its versions, and treat every upgrade like a database migration.

Check yourself. A colleague wants to upgrade to Pi 1.7 because it fixes a bug you do not have. What do you say? (Not yet. agents 0.34 supports only Pi 1.6. Wait for an agents release that supports 1.7, then upgrade both together on a branch, and run the full test suite first.)

Owner
Panaversity