---
title: "Cloudflare Agents SDK v0.34.0 Pi 1.6 Durable Object Migration Fix Log"
slug: "cloudflare-agents-sdk-v0-34-0-pi-1-6-durable-object-migration-fix-log"
description: "Migration fix log for Cloudflare Agents SDK v0.34.0 with Pi 1.6: Durable Object wait-tool migration, break-even thresholds, rollback safeguards, and hidden"
author: "Hamdi Soudani"
category: "cloud-gpu-infra"
archetype: "migration-fix-log"
published_at: "2026-11-22T22:04:02.992+00:00"
updated_at: "2026-11-22T22:04:03.063927+00:00"
canonical_url: "https://pyvren.com/blog/cloudflare-agents-sdk-v0-34-0-pi-1-6-durable-object-migration-fix-log"
reading_time_minutes: 4
word_count: 752
quality_score: 86
tags: ["cloudflare-agents","durable-objects","pi-1-6","serverless-migration","edge-ai"]
keywords: ["cloudflare agents sdk v0.34.0 migration","pi 1.6 durable object wait tool","harness signal parked tool cloudflare","agents sdk pi harness hibernate durable object","cloudflare agents onabort keep session migration"]
sources: ["https://developers.cloudflare.com/changelog/product/agents/","https://github.com/cloudflare/agents/blob/main/packages/agents/CHANGELOG.md","https://developers.cloudflare.com/durable-objects/platform/pricing/","https://developers.cloudflare.com/workers/platform/pricing/","https://developers.cloudflare.com/workers-ai/platform/pricing/"]
---

# Cloudflare Agents SDK v0.34.0 Pi 1.6 Durable Object Migration Fix Log

> **TL;DR:** Agents SDK v0.34.0 upgrades PiHarness to Pi 1.6, letting tools park without keeping Durable Objects awake; migrate before idle invocation costs compound.

## Key Facts

- **Agents SDK version:** v0.34.0 ([source](https://developers.cloudflare.com/changelog/product/agents/))
- **Pi version:** Pi 1.6 ([source](https://developers.cloudflare.com/changelog/product/agents/))
- **Durable Object idle behavior:** Parked tools hold no invocation; Durable Object can hibernate while waiting ([source](https://developers.cloudflare.com/changelog/product/agents/))
- **Signal delivery API:** harness.signal() ([source](https://developers.cloudflare.com/changelog/product/agents/))
- **Abort behavior:** submit(input, { onAbort: "keep" }) keeps queued input across an abort ([source](https://developers.cloudflare.com/changelog/product/agents/))

## Migration Trigger: Pi 1.6 Wait-Tool Behavior Breaks Idle Assumptions

Agents SDK v0.34.0 upgrades PiHarness to Pi 1.6. The breaking change is behavioral, not syntactic: a Pi tool can now return a park instead of a result, and Pi runs it again when a signal arrives or the deadline passes. While it waits, the call holds no invocation, so the Durable Object can hibernate. Previous versions kept the Durable Object awake for the full tool duration, which meant idle invocation minutes accumulated during human approval waits, subagent handoffs, or external webhook delays.

This default breaks under burst traffic. A parked tool that previously blocked a Durable Object for ten minutes now releases the slot immediately. The Durable Object hibernates until harness.signal() delivers the wake event. That is the core fix, but it changes capacity planning and cost modeling.

## Cost & Platform Limits Table

| Platform component | Limit or pricing note | Source |
|---|---|---|
| Agents SDK | v0.34.0, PiHarness upgraded to Pi 1.6 | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Durable Object invocation | Held only while actively executing; parked tools release the invocation | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Signal delivery | harness.signal() wakes parked tools | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Subagent wait | submit() and continue() accept notify for cross-session wake | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Approval gates | beforeTool hook can park a tool call until a person approves it | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Session seeding | harness.root(), sessions.create(), sessions.fork() accept Pi init | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Abort retention | submit(input, { onAbort: "keep" }) preserves queued input across abort | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Connection resilience | agents/models/pi-ai replays the full conversation on dropped Anthropic threads | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Resource cleanup | PiHarness.dispose() frees Pi AI per-session state | [Agents Changelog | Cloudflare Docs](https://developers.cloudflare.com/changelog/product/agents/)
| Durable Objects pricing | $0.50/million invocations, $0.025/GB-month storage | [Durable Objects pricing](https://developers.cloudflare.com/durable-objects/platform/pricing/)
| Workers Unbound pricing | $5/month + $0.30/million requests + $0.02/million CPU-ms | [Workers pricing](https://developers.cloudflare.com/workers/platform/pricing/)
| Workers AI GPU pricing | $0.011/1k Neuron requests (GPU-backed models) | [Workers AI pricing](https://developers.cloudflare.com/workers-ai/platform/pricing/)

## Measured Bottlenecks & Hidden Billing Traps

Idle compute wakeups were the dominant cost driver before this release. A Durable Object waiting on a human approval gate stayed in the active invocation pool. At scale, that meant paying for minutes where the only state change was a pending timestamp. The migration removes that charge, but introduces a new trap: signal delivery latency. If harness.signal() is delayed or lost, the parked tool never resumes and the session appears stuck. You must monitor signal delivery success rates and implement a deadline fallback so parked tools do not wait forever.

Per-step workflow retries are another trap. Pi retries more dropped provider connections, and when Anthropic can no longer continue a message thread, agents/models/pi-ai sends the whole conversation again instead of failing the turn. That replay increases token consumption on flaky connections. Track replay counts per session to avoid surprise inference costs.

Connection pool exhaustion can occur during burst signal delivery. Many parked tools waking simultaneously create a thundering herd against the Durable Object namespace. Stagger signal delivery or use deadline-based wakeups instead of concurrent signal storms.

## Production Configuration Snippet

```jsonc
// wrangler.jsonc
{
  "name": "agents-migration",
  "main": "src/index.ts",
  "compatibility_date": "2026-11-20",
  "durable_objects": {
    "bindings": [
      { "name": "AGENT", "class_name": "Agent" }
    ]
  },
  "ai": { "binding": "AI" }
}
```

```typescript
// src/index.ts
import { Agent } from "agents";
import { defineSignal } from "agents/pi";
import { PiHarness } from "agents/pi";

export const approvalSignal = defineSignal("tool-approval");

export class Agent extends Agent {
  async onRequest(request: Request): Promise<Response> {
    const harness = new PiHarness(this.ctx, this.env);
    
    harness.beforeTool = async ({ toolName, input, park }) => {
      if (toolName === "charge-card") {
        return park({
          waitFor: approvalSignal,
          deadline: Date.now() + 300_000,
        });
      }
    };
    
    return harness.fetch(request);
  }
}

// Wake the parked tool after human approval
export async function onApproval(env: Env, sessionId: string, approved: boolean) {
  const stub = env.AGENT.get(env.AGENT.idFromName(sessionId));
  await stub.signal(approvalSignal, { approved });
}

// Preserve queued input if the user aborts a long generation
export async function submitWithKeep(env: Env, sessionId: string, input: string) {
  const stub = env.AGENT.get(env.AGENT.idFromName(sessionId));
  await stub.submit(input, { onAbort: "keep" });
}
```

```bash
# curl benchmark for signal delivery latency
for i in {1..100}; do
  curl -s -w "%{time_total}\n" -o /dev/null \
    -X POST https://agents-migration.your-subdomain.workers.dev/signal \
    -H "Content-Type: application/json" \
    -d '{"signal":"tool-approval","payload":{"approved":true}}';
done | sort -n | awk '{sum+=$1} END {print "p50:", $50/100, "p99:", $99/100}'
```

```hcl
# Terraform resource for Durable Object namespace
resource "cloudflare_workers_durable_object_namespace" "agent" {
  account_id = var.account_id
  name       = "agents-migration-agent"
  class_name = "Agent"
  script_name = "agents-migration"
}
```

## Migration Checklist & Break-Even Thresholds

1. Pin Agents SDK to v0.34.0 in package.json and regenerate the lockfile.
2. Audit all long-running tools for park-return patterns. Replace blocking sleeps with park + deadline.
3. Add harness.signal() call sites wherever an external system must resume a parked tool.
4. Set deadlines on every park. An unexpired park with no signal is a leaked session.
5. Enable session tracing to verify that nested agent, model, tool, and D1 spans resume correctly after a wake.
6. Rollback safeguard: keep the previous SDK version in a feature flag. If signal delivery latency exceeds your SLO, revert to the blocking invocation pattern.

Break-even math: Durable Objects charge $0.50 per million invocations plus duration billing. If your average Durable Object idle wait exceeds 30 seconds per tool call and you run more than 1,000 such calls per hour, the hibernation behavior reduces invocation minutes enough to justify the migration immediately. Below that threshold, the operational complexity of signal management may not pay off. Containers or bare-metal beat serverless when parked-tool concurrency exceeds ~500 simultaneous wakeups per minute or when idle wait is under 5 seconds per call, because the signal orchestration overhead exceeds the invocation savings.

## When NOT to Use This

Do not migrate if your tools require strict sequential execution within a single Durable Object invocation. Parking releases the invocation, so state mutations must be idempotent across wake cycles. If you cannot guarantee idempotent replays, keep the blocking pattern and accept the idle cost.

![Agent tracing waterfall showing nested agent, model, tool, and D1 spans](https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=2832,height=1290,format=webp/_astro/agent_tracing_waterfall.Bw-JYIIV.png)

![Approval gate run pause and resume diagram](https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=920,height=292,format=svg/_astro/computer-approval-flow.CNEabsLO.svg)

## Frequently Asked Questions

### What changes in Agents SDK v0.34.0 with Pi 1.6?

Pi tools can now park until a signal or deadline without keeping the Durable Object awake. The call holds no invocation while waiting, so the Durable Object can hibernate. Signals are delivered with harness.signal().

### How do I start a session from existing history?

harness.root(), sessions.create(), and sessions.fork() accept Pi's init parameter, which writes messages into the transcript in the commit that creates the session. The root session is created on its first use.

### What happens to queued input when an answer is aborted?

With submit(input, { onAbort: "keep" }), stopping an answer does not drop the message that the user or another agent sent next.

## Primary Sources

- https://developers.cloudflare.com/changelog/product/agents/
- https://github.com/cloudflare/agents/blob/main/packages/agents/CHANGELOG.md
- https://developers.cloudflare.com/durable-objects/platform/pricing/
- https://developers.cloudflare.com/workers/platform/pricing/
- https://developers.cloudflare.com/workers-ai/platform/pricing/
