Skip to content

fix: use Client subclient pattern for async activity completion#451

Open
donald-pinckney wants to merge 1 commit intomainfrom
fix/use-client-subclient-pattern
Open

fix: use Client subclient pattern for async activity completion#451
donald-pinckney wants to merge 1 commit intomainfrom
fix/use-client-subclient-pattern

Conversation

@donald-pinckney
Copy link

@donald-pinckney donald-pinckney commented Mar 6, 2026

What was changed

Replace direct AsyncCompletionClient instantiation with the recommended Client subclient pattern in the async-completion activity example.

Why?

The API docs note that "Typically AsyncCompletionClient should not be instantiated directly". The recommended pattern for ~3 years has been to create Client first, then access subclients as properties (client.activity.complete()).

Checklist

  1. Closes N/A - no issue, minor fix

  2. How was this tested:
    Run the samples in CI

  3. Any docs updates needed?
    The docs here use this code snippet. Do I need to do anything to re-sync the snipped to the docs?

Replace direct AsyncCompletionClient instantiation with the recommended
pattern of creating Client first and accessing subclients as properties.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@donald-pinckney
Copy link
Author

Context: uncovered this when making the skill. Discussion was here: temporalio/skill-temporal-developer#31 (comment)

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