Skip to content

refactor(strands): remove the unused StrandsFailureConverter (breaking) - #281

Closed
campoy wants to merge 3 commits into
fix/strands-typescript-plugin-replaces-caller-failure-converterfrom
refactor/strands-typescript-remove-failure-converter
Closed

campoy wants to merge 3 commits into
fix/strands-typescript-plugin-replaces-caller-failure-converterfrom
refactor/strands-typescript-remove-failure-converter

Conversation

@campoy

@campoy campoy commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What was changed

  • Removes StrandsFailureConverter, its failureConverter instance and the index export.
  • Renames failure-converter.ts to strands-errors.ts, which keeps rewriteError, rewriteTerminalError and STRANDS_INTERRUPT_TYPE. STRANDS_INTERRUPT_TYPE is still exported from the package.

Stacked on #200. Review base: #200's branch.

Why?

After #200 the plugin no longer installs this converter: an Activity interceptor and a Workflow interceptor rewrite Strands errors instead. As a failure converter it could only retype a Strands error nested as the cause of another error, because the SDK wraps every top-level error (ensureApplicationFailure/ensureTemporalFailure) before a converter sees it. That changes neither retries, which read the top-level failure, nor interrupt routing, which reads one level. Keeping it exported invites users to install it for behavior it doesn't give. A code owner's review of #200 asked to delete it in this release, which is already breaking.

Breaking change

Code that imports StrandsFailureConverter, or sets failureConverterPath to @temporalio/strands-agents/lib/failure-converter, no longer builds or starts. Remove the import or the path; the plugin already does what the converter did, and more. A GitHub code search found no TypeScript code that imports it. The TypeScript sample mentions it in a comment and its README.

No runtime or replay change otherwise. The class decoded exactly like the SDK's default converter, so histories written by someone who installed it themselves still replay.

Checklist

  1. No issue of its own; follow-up to fix(strands): keep the caller's failure converter and turn Strands errors into Temporal failures (breaking) #200.

  2. How was this tested:

    • Local, in a Linux container with Node 24 and pnpm 10.27.0: make sync, make lint, make test (38 tests; 39 after merging fix(strands): keep the caller's failure converter and turn Strands errors into Temporal failures (breaking) #200's caae774 into this branch as dca1555), make build, the npm package check, the smoke install and check_conventions.py pass, and Prettier with the SDK settings reports the files clean. The packed tarball has lib/strands-errors.js and no lib/failure-converter.js. The Node 22, macOS and Windows cells did not run locally.
    • No new test: nothing outside the removed code referenced it.
  3. Any docs updates needed?
    Release notes must name the removed export. The Temporal docs page for the plugin names StrandsFailureConverter and needs a change once this is released, as does the TypeScript sample's comment and README.

The plugin no longer installs StrandsFailureConverter: an activity
interceptor and a workflow interceptor rewrite Strands errors instead.
As a failure converter it could only retype a Strands error nested as
the cause of another error, since the SDK wraps every top-level error
before a converter sees it, so it changed neither retries nor interrupt
routing.

Remove the class, its failureConverter instance and the index export,
and rename the module to strands-errors, which keeps rewriteError,
rewriteTerminalError and STRANDS_INTERRUPT_TYPE.

Breaking change: code that imports StrandsFailureConverter, or sets
failureConverterPath to @temporalio/strands-agents/lib/failure-converter,
no longer builds or starts. Remove the import or the path.
…places-caller-failure-converter' into refactor/strands-typescript-remove-failure-converter
…places-caller-failure-converter' into refactor/strands-typescript-remove-failure-converter
@campoy

campoy commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #200 as c083568, so the removal ships in the same release as the interceptor change. The review history stays here.

@campoy campoy closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant