---
title: Workflows rollback handlers now include step context
description: Workflows rollback handlers now receive the original step context, and rollbackConfig is limited to retry and timeout settings.
image: https://developers.cloudflare.com/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## Workflows rollback handlers now include step context

Jun 23, 2026 

[ Workflows ](https://developers.cloudflare.com/workflows/) 

[Workflows](https://developers.cloudflare.com/workflows/) makes it easier to build reliable multi-step applications that can recover when downstream systems fail. Rollback handlers now receive the original [step context](https://developers.cloudflare.com/workflows/build/step-context/) via a `ctx` object for the step being rolled back. This includes `ctx.step.name`, `ctx.step.count`, `ctx.attempt`, and the step `config` with defaults applied.

The [step configuration](https://developers.cloudflare.com/workflows/build/workers-api/#workflowstepconfig) includes the retry and timeout settings used for that step, so you can customize your step recovery logic according to those fields.

TypeScript

```
await step.do(  "create charge",  async () => {    const charge = await createCharge();    return { chargeId: charge.id };  },  {    rollback: async ({ ctx, output, error }) => {      // `output` is the value returned by the step being rolled back.      const { chargeId } = output as { chargeId: string };      await refundCharge(chargeId, {        // `ctx` is the original step context, including step name, count, attempt, and config.        reason: `${ctx.step.name}: ${error.message}`,      });    },    rollbackConfig: {      // `rollbackConfig` controls retries and timeout for the rollback handler.      retries: { limit: 3, delay: "30 seconds", backoff: "linear" },      timeout: "5 minutes",    },  },);
```

Refer to [rollback options](https://developers.cloudflare.com/workflows/build/workers-api/#rollback-options) to learn more.

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2026-06-16-rollback-options/#page","headline":"Workflows rollback handlers now include step context · Changelog","description":"Workflows rollback handlers now receive the original step context, and rollbackConfig is limited to retry and timeout settings.","url":"https://developers.cloudflare.com/changelog/post/2026-06-16-rollback-options/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog-preview.png","dateModified":"2026-06-23","datePublished":"2026-06-23","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
