fix(ai-sdk): use activityOptions in callTool proxy#1954
Merged
chris-olszewski merged 1 commit intotemporalio:mainfrom Mar 9, 2026
Merged
fix(ai-sdk): use activityOptions in callTool proxy#1954chris-olszewski merged 1 commit intotemporalio:mainfrom
chris-olszewski merged 1 commit intotemporalio:mainfrom
Conversation
…proxy The callTool activity proxy in TemporalMCPClient spreads `this.options` (the full TemporalMCPClientOptions object) instead of `this.options.activityOptions`. This causes `name`, `clientArgs`, and other non-ActivityOptions fields to be passed into `workflow.proxyActivities()`, which silently ignores the custom `activityOptions` the caller intended to set. The listTools proxy on line 36 already correctly uses `this.options.activityOptions` — this fix makes callTool consistent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
The
callToolactivity proxy inTemporalMCPClientspreadsthis.options(the fullTemporalMCPClientOptionsobject) instead ofthis.options.activityOptionsintoworkflow.proxyActivities().This means any custom
activityOptions(e.g.startToCloseTimeout,retry) passed toTemporalMCPClientare silently ignored for tool calls, while unrelated fields likenameandclientArgsleak into the activity options.The
listToolsproxy already correctly usesthis.options.activityOptions— this is a one-line fix to makecallToolconsistent.Before (bug)
After (fix)
Test plan
TemporalMCPClientwith customactivityOptions(e.g.startToCloseTimeout: '1 minute')callToolactivities now respect the custom timeout instead of defaulting to 10 minuteslistToolscontinues to work as before (already correct)