# 33.9 Limits, and how today's tools realize it (/affordable-self-improving-ai-workers/building-a-durable-ai-worker/limits-and-todays-tools)

---
type: Document
title: "33.9 Limits, and how today's tools realize it"
description: "What Pi Durable 1.6 on Cloudflare does not do yet, how to build a subagent without one, who keeps a worker durable on each foundation, and the exact versions this chapter was built and tested on."
status: stable
order: 433.09
ksor:
  owner: team:panaversity
  audience: [ public ]
  approval:
    by: process:panaversity
    at: 2026-11-30T08:18:55Z
chapter: "33"
part: IV
expert_status: manager
concepts: [ "33.9" ]
last_verified: 2026-11-29
sources:
  - id: pi-harness
    title: "Pi harness (Cloudflare Agents documentation, verified 2026-11-29)"
    resource: https://developers.cloudflare.com/agents/harnesses/pi/
  - id: paper
    title: "Building Affordable, Self-Improving AI Workers (Panaversity, 29 November 2026), sections 4.1 and 6.4"
    resource: "Panaversity paper, version 1.0, 29 November 2026 (not yet published)"
generated:
  at: 2026-11-30T08:18:55Z
  by: human:zia
trust_tier: unverified
build_id: sha256:d6ce3f28a2cf8e492a60bae1b426b7cc6466e35e83d70c3b9763db2c55009f4b
dirty: true
ksor_version: 0.0.60
---

**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](../the-worker-platform/tenants-connectors-and-deletion.md)). 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](waiting-for-a-person.md), 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](../choosing-the-foundation/claude-managed-agents-first.md)). 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](../choosing-the-foundation/the-fair-alternative.md)). 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.

| Job | Claude Managed Agents | OpenAI Agents SDK | Pi Durable |
| --- | --- | --- | --- |
| Save each step | Anthropic | You add it | Built in |
| A side effect runs once after a crash | Your key, in your tool | Your key, in your tool | `api.memo` in the tool, which you still write |
| Wait for a person without paying | Built in | Built in (`RunState`) | Built in (a waiting tool) |
| Accept a repeated message once | Your key | Your key | `operationId` |

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.)*
