Skip to content

Show RetryPolicy import in Python getting-started#104

Open
donald-pinckney wants to merge 1 commit intomainfrom
fix-retry-policy-import-hint
Open

Show RetryPolicy import in Python getting-started#104
donald-pinckney wants to merge 1 commit intomainfrom
fix-retry-policy-import-hint

Conversation

@donald-pinckney
Copy link
Copy Markdown
Collaborator

Summary

  • Agents using this skill have produced workflow.RetryPolicy(...), which fails with module 'temporalio.workflow' has no attribute 'RetryPolicy'.
  • Root cause: references/python/python.md (the entry-point file SKILL.md tells agents to read first) only ever shows symbols from the workflow module — workflow.defn, workflow.run, workflow.execute_activity, workflow.logger, etc. — and never shows retry_policy= or the temporalio.common import. Agents pattern-match "Temporal things live on workflow.*" and hallucinate the namespace when they need a retry policy.
  • Fix: extend the existing execute_activity example with a retry_policy=RetryPolicy(...) argument and the correct from temporalio.common import RetryPolicy import, plus a one-line note that configuration types (RetryPolicy, SearchAttributeKey, VersioningBehavior, ...) live in temporalio.common, not on the workflow module.

Test plan

  • Re-run the agent task that previously produced workflow.RetryPolicy and confirm it now imports RetryPolicy from temporalio.common.
  • Skim the updated example for accuracy against the current temporalio SDK.

🤖 Generated with Claude Code

The Python getting-started example only used symbols from temporalio.workflow,
which led agents to hallucinate workflow.RetryPolicy when adding retries.
Add retry_policy to the execute_activity example with the correct
temporalio.common import, plus a note clarifying which types live where.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@donald-pinckney donald-pinckney requested a review from a team as a code owner May 1, 2026 20:50
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.

2 participants