Cloudflare Agents SDK 0.33.0: session.watch() replaces session.events() and retry() is removed (November 3, 2026)
Agents SDK 0.33.0 moves PiHarness to Pi 1.5. session.events() becomes session.watch(), retry() is gone, and there is no way back to Pi 1.4.
3 of 3 free copies left this month.Unlimited with Pro
What changed
On November 3, 2026 Cloudflare released Agents SDK v0.33.0 (npm package agents), which upgrades PiHarness to Pi 1.5.
session.watch()replacessession.events().session.entries()pages older transcript entries.- New
session.continue()starts a run on the existing transcript, anddefaults.maxTurnscaps tool rounds in new sessions. retry()and theparkedstatus are removed. Tasks that hit the restart limit now end.agents/harness/pi,agents/models/pi-aiand the Pi tools need Pi~1.5.0, and pi-ai no longer exports TypeBox'sType.- Streamed progress is saved in batches, so a crash can lose up to about one second of streamed progress by default.
- Once a conversation runs on Pi 1.5, Pi 1.4 cannot read it. Roll forward, not back.
Cloudflare says long answers now use about 27 times fewer storage transactions.
Prerequisites
- A Workers project that uses the Agents SDK with PiHarness,
agents/models/pi-aior the Pi tools - No new key is needed
Steps
- Upgrade:
npm install agents@0.33.0. - Update Pi to
~1.5.0(@earendil-works/pi-durable,pi-ai,chord) and install@earendil-works/pi-schemaalongside them. - Replace every
session.events()call withsession.watch()and render the view each time it changes. From theagentschangelog:
- const stream = await session.events();
- initialize(stream.snapshot);
- stream.start(async (events) => events.forEach(apply));
+ const watch = await session.watch();
+ render(watch.value);
+ watch.start(async (call) => {
+ if (call.kind === "value") render(call.value);
+ });