v1.41.0
Breaking Changes
💥 Worker Heartbeats
This release adds a new feature called Worker Heartbeating. This feature spins up a single nexus-only worker per Client/Namespace in the background and periodically sends some basic metrics over to server for all of the workers registered on the same Client/Namespace.
Server version 1.29.1 and newer supports this feature. This feature will be enabled by default, although this currently requires a server dynamic config flag, --dynamic-config-value frontend.WorkerHeartbeatsEnabled=true to enable. Currently, the only way to interact with this new data is to also enable the flag --dynamic-config-value frontend.ListWorkersEnabled=true, then use CLI commands temporal worker list and temporal worker describe to query the data. If heartbeating is enabled with a server version older or with the config flag off, a single warning log Worker heartbeating configured for runtime, but server version does not support it. on worker startup will emit.
💥 With the introduction of Worker Heartbeats, we’ve deprecated the contrib/resourcetuner lib, and instead created a new contrib/sysinfo lib. The resource tuner now lives in the worker package.
💥 Nexus Error Serialization Improvements
Note: Requires Temporal Server version 1.31.0 or later.
This release of the Go SDK includes a number of enhancements to error serialization for synchronous operations.
nexus.HandlerErrorcan now include its own message (and stack trace if the language supports it) independent from thecausenexus.OperationErrorcan now include its own message (and stack trace if the language supports it) independent from thecause- 💥
nexus.OperationErroris now included in the error chain when a synchronous operation handler returns anexus.OperationError. Thenexus.OperationErrorwill be translated to an appropriate Temporal error based on the state of the error. Previously this error was not included in the error chain.OperationStateFailedwill be translated to anApplicationErrorOperationStateCancelledwill be translated to anCanceledError
These changes only effect synchronous operations. There is no change to errors for asynchronous operations like starting a workflow.
Highlights
Nexus Operation Timeouts
Note: Requires Temporal Server version 1.31.0 or later.
This release of the Go SDK adds more timeout options on NexusOperationOptions to control how long the caller wants to wait on different stages of the operation.
Schedule-to-Start timeout
The Schedule-to-Start timeout limits how long the caller will wait for the Operation to be started by the handler. If not set, no Schedule-to-Start timeout is enforced.
fut := c.ExecuteOperation(ctx, service.HelloOperationName, service.HelloInput{Name: name, Language: language}, workflow.NexusOperationOptions{
ScheduleToStartTimeout: 2 * time.Minute,
})
Start-to-Close timeout
The Start-to-Close timeout limits how long the caller will wait for an asynchronous Operation to complete after it has been started. This timeout only applies to asynchronous Operations. If not set, no Start-to-Close timeout is enforced.
fut := c.ExecuteOperation(ctx, service.HelloOperationName, service.HelloInput{Name: name, Language: language}, workflow.NexusOperationOptions{
StartToCloseTimeout: 5 * time.Minute,
})
Add trampolining API for versioned continue-as-new
Added support for workflows to detect when their target deployment version has changed and opt into upgrading via continue-as-new. New APIs:
- WorkflowInfo.GetTargetWorkflowDeploymentVersionChanged() — check if the workflow's target version changed
- WorkflowInfo.GetContinueAsNewSuggestedReasons() — get reasons why CAN is suggested
- ContinueAsNewVersioningBehaviorAutoUpgrade option for ContinueAsNewError — explicitly upgrade to the new version on CAN
This enables a "trampolining" pattern: a pinned workflow detects a version change, then continues-as-new with auto-upgrade to seamlessly move to the latest deployment version. Both detection and action are fully opt-in, avoiding accidental infinite CAN loops.
What's Changed
- Nexus caller timeouts by @bergundy in https://github.com/temporalio/sdk-go/pull/2146
- Fix cgroup detection condition by @yuandrew in https://github.com/temporalio/sdk-go/pull/2179
- Introduce SDK flag to use user DC on Memo's by @yuandrew in https://github.com/temporalio/sdk-go/pull/2121
- 💥Add worker heartbeat support by @yuandrew in https://github.com/temporalio/sdk-go/pull/2186
- workflowcheck: Fix Go 1.26 false positives for SetFinalizer and godebug.Setting by @cretz in https://github.com/temporalio/sdk-go/pull/2192
- Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.1 in /contrib/sysinfo by @dependabot[bot] in https://github.com/temporalio/sdk-go/pull/2194
- Change ShutdownWorker err log from Debug to Warn by @yuandrew in https://github.com/temporalio/sdk-go/pull/2195
- Make search attribute type more lenient when parsing by @cretz in https://github.com/temporalio/sdk-go/pull/2197
- Reduce test flakes by @yuandrew in https://github.com/temporalio/sdk-go/pull/2196
- Selector Signal fix with multiple workers by @yuandrew in https://github.com/temporalio/sdk-go/pull/2134
- Handle disabled TLS in envconfig ToClientOptions by @dandavison in https://github.com/temporalio/sdk-go/pull/2205
- Fix canceling external workflows that are children in testsuite by @yuandrew in https://github.com/temporalio/sdk-go/pull/1968
- Fix standalone activity result long-poll bug by @dandavison in https://github.com/temporalio/sdk-go/pull/2198
- 💥 Use Temporal Failures for Nexus Error Serialization by @Quinn-With-Two-Ns in https://github.com/temporalio/sdk-go/pull/2181
- Fix 2090 child workflow goroutine leak by @kritibehl in https://github.com/temporalio/sdk-go/pull/2200
- Add trampolining API for versioned continue-as-new by @THardy98 in https://github.com/temporalio/sdk-go/pull/2216
- Upgrade go.opentelemetry.io/otel/sdk to v1.40.0 by @yuandrew in https://github.com/temporalio/sdk-go/pull/2218
- Revert "Upgrade go.opentelemetry.io/otel/sdk to v1.40.0" by @yuandrew in https://github.com/temporalio/sdk-go/pull/2221
New Contributors
- @kritibehl made their first contribution in https://github.com/temporalio/sdk-go/pull/2200
Full Changelog: https://github.com/temporalio/sdk-go/compare/v1.40.0...v1.41.0
Fetched April 11, 2026
