Repository navigation
Conversation
temporalio 1.36 processes a workflow activation's jobs as one batch (workflow logic flag 2), so a signal or update handler no longer runs before the other jobs delivered in the same activation. When the decide Update arrived in the same activation as the lost-connection failure of the read Activity, the wait in ask_human was cancelled before it consumed the decision and the finally block reset it, so the turn redone after a Worker restart asked again. Recording the decision in the handler itself, keyed by the pending call, keeps it for the redone turn on 1.35 and 1.36. Fixes tests/claude_agent_sdk_plugin/human_in_the_loop_test.py::test_decision_survives_a_worker_restart on temporalio 1.36.0 (failed 3 of 3 runs before, passes 3 of 3 after; 3 of 3 on 1.35.0 before and after). The docs snippets python-claude-agent-sdk-human-in-the-loop-approval and -decision change with it.
An AssertionError in an Update handler fails the Workflow Task, which the Worker retries while the Update stays stuck; an ApplicationError fails only this Update. call_key is now a static method inside the python-claude-agent-sdk-human-in-the-loop-approval snippet, so the quoted code shows it. No marker name changes.
Both lock files move temporalio-agent-framework from b5ed079c to 1c2006ae on dabh/agent-framework-python; no signature the samples use changed.
Both locks move temporalio-agent-framework from 1c2006ae to 509bfab4 on dabh/agent-framework-python; the only change in each lock is that commit hash.
The plugin is now temporalio-microsoft-agent-framework, since an unqualified agent framework could be anyone's, and the samples follow it in the directory, the dependency group, the task queues, the snippet markers and the uv source pin, which now points at the renamed plugin revision. The framework's own agent_framework imports and the agent-framework-openai distribution are Microsoft's names and stay as they are.
Both locks move temporalio-microsoft-agent-framework from d20bc0c8 to d374e26c on dabh/agent-framework-python; the only change in each lock is that commit hash.
Since d374e26c a client with streaming_topic runs every model call as the streaming Activity, with or without stream=True, so the sample calls agent.run(prompt) and the README no longer says a topic needs stream=True. The test's expectations were already met: one invoke_model_streaming Activity and every update at the subscriber.
Both locks move temporalio-microsoft-agent-framework from d374e26c to 8b472d21 on dabh/agent-framework-python. Each lock changes the git revision line and adds opentelemetry-api to the plugin's dependency list, which the plugin now declares; no other package moves.
A turn sent during another turn's model call gets its reply from the run the server delivers it to, and an end_chat sent during a turn ends the chat after that turn. The sample's turns are Updates, so nothing waits in Workflow fields at the handoff; the README and the module docstring say so, and the new test drives three turns and the end_chat across a continue-as-new chain with a slow scripted client.
Both locks move temporalio-microsoft-agent-framework from 8b472d21 to a453fa6c on dabh/agent-framework-python. The mcp project's lock also moves temporalio-mcp from 0.3.0 to 0.4.0, which the plugin now requires; no other package moves.
Both locks move temporalio-microsoft-agent-framework from a453fa6c to 54998df8 on dabh/agent-framework-python; the only change in each lock is that commit hash. agent-framework-core stays at 1.26.0 here: this repository has no cooldown, and the plugin's floor allows it.
ai-integrations#522 merged as e7303bbc, the same tree as 54998df8, and the branch was deleted, so both [tool.uv.sources] entries now name the commit with rev instead of the branch. Each lock changes its source line and the dependency reference accordingly; no package moves.
On temporalio 1.36 the SDK's ClientConnectConfig carries plugins, so mypy rejects Client.connect(**config, plugins=[...]) as passing plugins twice. The SDK's load_client_connect_config docstring asks callers to combine their plugins with the config's plugins rather than pass them separately, and these 17 sites now do that and pass **config alone. The config is copied into a plain dict first because the Python 3.10 cell lints against temporalio 1.35, whose ClientConnectConfig has no plugins key.
The plugin is published, so both [tool.uv.sources] git entries go and the group and the mcp project pin temporalio-microsoft-agent-framework >=0.0.1 the way the other plugin samples pin theirs. In each lock only the plugin moves, from 0.0.0 at e7303bbc to 0.0.1 on PyPI.
DABH
marked this pull request as ready for review
November 16, 2026 03:03
moetemp
reviewed
Nov 16, 2026
Once the Workflow is complete, subscribe reads the rest of the stream and then ends, so the starter awaits the consume task after handle.result() and drops the drain loop, its 10-second timeout and the printed list. The test does the same without the early return, and checks that a subscriber that starts after the Workflow completed still gets every update.
@workflow.init gives __init__ the ChatInput and runs before any handler, so the agent and the session exist when a turn arrives with the start or right after a continue-as-new. turn loses its wait and assert, and transcript its None check.
The project installs the plugin on 3.11 and later, so an ImportError there is a failure, not a reason to collect nothing and stay green. The guard now skips collection below 3.11 only.
Agent Framework starts invoke_agent from Workflow code, and the replay- safe provider is why the sample uses create_tracer_provider(). The Worker replays the Workflow (max_cached_workflows=0), so the test now checks that the span appears once, with RunWorkflow:TracedWorkflow as its parent and the caller's trace id.
/tmp/../etc/passwd passed the startswith check. The middleware now normalizes the path with posixpath.normpath first, which has no side effects and works in the Workflow sandbox; the import sits inside the quoted snippet region. The test adds that path and the README says so.
validate_decide rejects the Update when nothing is pending, and nothing runs between the validator and the handler, so the branch is not reachable; it narrows the type for the checker, and raising ApplicationError there fails only the Update if that ever changed.
Closed
moetemp
approved these changes
Nov 18, 2026
The .NET sample does the same, so both report `/tmp/../etc/passwd` for that call.
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.
What was changed
This PR adds samples for the new Temporal plugin for Microsoft Agent Framework that we just shipped on PyPI.
The usual samples are included: hello world, tools, MCP, human in the loop, middleware, multi-agent, structured output, streaming, continue-as-new and OpenTelemetry.
The MCP sample is a standalone uv project like
openai_agents/mcp_v2, because the Strands and Google GenAI groups pinmcp<2and the plugin needsmcp>=2.2.The plugin requires
temporalio>=1.36, which dropped Python 3.10, so the group carriespython_version >= '3.11'markers and the lock forks. Will update this once the repo drops 3.10 overall (I see there's already a PR for this).Note that there are side effects of using 1.36 that show up in this PR (outside the MAF-specific code). On 1.36 the SDK's
ClientConnectConfigcarriesplugins, so 17 existingClient.connect(**config, plugins=...)calls now add their plugin to the config'spluginsand pass**config, as theload_client_connect_configdocstring asks. Also,claude_agent_sdk_plugin/human_in_the_loopnow records its decision in the Update handler, since 1.36 delivers an Update and a Signal in one activation.Why?
The plugin and its docs page need runnable, tested samples to quote.
Checklist
No linked issue.
How was this tested: 39 tests pass locally across the new and the Claude samples (12 on the time-skipping server, where the Claude suite skips itself), the standalone MCP test passes, lint is clean on 3.10 and 3.14, all on the published 0.0.1.