Samuel Arendt

Cloudflare Agents SDK 0.34.0 requires Pi 1.6 and cannot be rolled back

On November 20, 2026, Cloudflare released version 0.34.0 of the agents package, its SDK for building AI agents on Workers and Durable Objects. The release requires Pi 1.6 (~1.6.0) and drops support for Pi 1.5. Pi is the harness behind agents/harness/pi, agents/models/pi-ai and the Pi tools: the layer that runs the loop between the model, the tools and the conversation sessions.

The part that changes planning is in the upgrade notes. According to the SDK changelog, once a conversation runs on Pi 1.6, Pi 1.5 can no longer run that conversation's tool calls or model requests. For that reason, a deployment cannot roll back past this release. Cloudflare's guidance is to fix a bad deploy by rolling forward with another deploy.

What ships with Pi 1.6

The upgrade brings behavior changes beyond the incompatibility:

  • A tool can park while it waits for a signal, a deadline or another session's answer, without keeping the agent awake. The Durable Object can hibernate meanwhile, and the signal is delivered with harness.signal().
  • The beforeTool hook can hold a tool call before it runs, for example until a person approves it.
  • Failed requests now return a generic 500 (or a 1011 close on WebSockets) without error details. To send something else, implement onFetchError().
  • An MCP server that needs a new sign-in throws MCPAuthorizationRequiredError with the authorization link, and a failed server stays failed until someone calls reconnectMcpServer(id).
  • A security fix: a WebSocket connection rejected in onConnect could still run one @callable method, state update or onMessage call. Messages that arrive after the close are now dropped.
  • claudeCode() now defaults to claude-sonnet-5-5. The changelog explains the switch by saying claude-sonnet-4-5 retires on November 30, 2026.

Who needs to look

The changelog says code changes are only needed for teams that use the Pi harness, agents/models/pi-ai or the Pi tools, an MCP client, or error details in failed responses. The rollback restriction hits the first group: teams that already run agents with conversations stored in Durable Objects and that count on reverting a deploy when something goes wrong.

Teams that use pi-durable directly also get API changes: RunEndTask is renamed HookTask, a tool's execute() may return a park, and code mode namespaces come from Extension.namespace. Code that only uses PiHarness and PiSession needs none of these changes.

The change in error responses affects any application that showed the error message to the client, including in local development. After the upgrade, that information only appears in the logs unless onFetchError() is implemented.

What to do before upgrading

There is no deadline to leave 0.33. The upgrade has to be handled like a data migration, because there is no way back. The best approach is to test 0.34.0 in an environment with its own Durable Objects, using conversations that exercise the agent's real tools, before taking it to production. Worker Previews isolate Durable Object namespaces per preview, the subject of A safe preview must isolate its connected resources.

The checklist should include:

  1. Upgrade @earendil-works/pi-durable, pi-ai, pi-schema and chord together to ~1.6.0.
  2. Replace (await harness.pi()).signal() with harness.signal(). According to the changelog, the old form does not schedule the harness wake-up first.
  3. Call harness.root() before reaching the root session through harness.pi(). Until its first use, sessions.list() leaves the root out and pi.conversation(ROOT_CONVERSATION_ID) returns undefined.
  4. Handle MCPAuthorizationRequiredError in callTool(), readResource() and getPrompt(), and give users a way to reconnect the server.
  5. Implement onFetchError() if any flow depended on error details.
  6. Agree with the team that a problem after the deploy will be solved with a new fix, not by reverting to the previous version.

What Cloudflare has not said yet

The changelog does not say how long the 0.33 line will keep getting fixes, or whether there will be a way to identify which conversations have already run on Pi 1.6. It also does not explain what happens during a gradual deployment, when two Worker versions serve traffic at the same time and a conversation could go through the new version and then the old one. Until that is documented, the safer option is to ship 0.34.0 all at once, after testing it in a separate environment.

If your company is weighing something similar or needs support on this topic, reach me on LinkedIn or WhatsApp.

References

Narrow steps rising between two white walls toward a deep blue sky

Photo by Wall Mamouth on Unsplash

#AI Agents, #Operations, #Radar