fix(client): include runId in WorkflowExecutionAlreadyStartedError - #2206
Open
ATKasem wants to merge 1 commit into
Open
fix(client): include runId in WorkflowExecutionAlreadyStartedError#2206ATKasem wants to merge 1 commit into
ATKasem wants to merge 1 commit into
Conversation
ATKasem
force-pushed
the
fix/already-started-error-run-id
branch
from
July 13, 2026 19:55
df528e3 to
936a4f2
Compare
ATKasem
force-pushed
the
fix/already-started-error-run-id
branch
from
July 13, 2026 19:56
936a4f2 to
91b890e
Compare
The server returns the runId of the already-running execution in the ALREADY_EXISTS error details (WorkflowExecutionAlreadyStartedFailure), but the SDK dropped it when constructing the error. Decode it and expose it as an optional `runId`, mirroring the existing Nexus handling. Closes temporalio#1838
ATKasem
force-pushed
the
fix/already-started-error-run-id
branch
from
July 20, 2026 13:14
91b890e to
9437d90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1838
The server returns the
runIdof the already-running execution in theALREADY_EXISTSerror details (WorkflowExecutionAlreadyStartedFailure), but the SDK discarded it when buildingWorkflowExecutionAlreadyStartedError. This adds an optionalrunIdto the error and populates it at the three throw sites (start,signalWithStart, update-with-start), decoding the detail via a newextractWorkflowExecutionAlreadyStartedRunIdhelper that mirrors the existingextractNexusOperationAlreadyStartedRunId.The new field is optional, so this is backwards-compatible; when the server does not provide the detail (e.g. older servers),
runIdis simplyundefined.Test plan
Extended the existing
Start of workflow respects workflow id conflict policyintegration test to assert thaterr.runIdmatches the running execution'sfirstExecutionRunId.