Apply `FunctionToolset`'s `strict`, `sequential`, `defer_loading` and `include_return_schema` defaults to `Tool` instances
This pull request was posted by Claude Code using claude-opus-5-5 on behalf of David.
Closes #12557
FunctionToolset applied its strict, include_return_schema, sequential and defer_loading defaults to tools added as functions, but not to Tool instances passed to the constructor or to add_tool(), although its docstrings say include_return_schema, sequential and defer_loading apply to all tools. add_tool() now applies all four, following #12378, which did the same for requires_approval. Inside a Temporal or DBOS workflow, a patch gate (workflow.patched(), DBOS.patch_async()) keeps sequential and defer_loading off those tools for workflows started before the upgrade, so they replay or recover. The dbos extra now requires dbos>=3.4.0, the first release whose DBOS.patch_async() works without enable_patching.
[!WARNING]
Compatibility impact: Existing code that gives Tool instances to a FunctionToolset with strict, include_return_schema, sequential=True or defer_loading=True now gets those values on the tools. A Tool that leaves strict or include_return_schema unset takes the toolset's value. A Tool built with sequential=False or defer_loading=False still gets True. The values are set on the Tool instance, as add_tool() already does for requires_approval, max_retries and metadata, so the same Tool used in another toolset or in Agent(tools=...) gets them too; #12617 tracks that.
Under defer_loading=True those tools are hidden until tool search reveals them, and a realtime session (agent.realtime()) holding one raises UserError when it opens, as it already did for a function added with defer_loading=True. Under include_return_schema=False the toolset's value now beats the IncludeToolReturnSchemas capability for those tools, as it already did for functions.
A Temporal workflow that started before the upgrade keeps listing those Tool instances without the toolset's sequential and defer_loading, in any toolset or agent that holds them, so its history still replays. The workflow records a workflow.patched() marker, pydantic_ai:function_toolset_defaults_on_tool_instances, the first time it lists such a tool, as pydantic_ai:stable_default_run_id does for default run IDs.
A DBOS workflow that started before the upgrade does the same, so it recovers with the steps it recorded. A run that holds such a tool calls DBOS.patch_async() with the same name once per workflow, when it enters its toolsets, and records a DBOS.patch- step there. If another run in the same workflow starts a step during that call, the workflow keeps the old listing and records no marker. Concurrent runs in one workflow can still fail to recover, as they can on main, and a recorded marker adds one more case: DBOSUnexpectedStepError when another run starts a step while recovery checks for the marker. The dbos extra now requires dbos>=3.4.0.
A Prefect flow has no such gate. Model request and tool call tasks key on the tool definitions, which now carry all four values, so a flow retried across the upgrade re-executes the model requests and tool calls of runs holding such a Tool, and under defer_loading=True the retried run hides those tools until tool search reveals them. The Prefect docs say to let in-flight flows finish before upgrading.
Why this can ship in a minor release: It's a bug fix. The constructor docstrings say include_return_schema, sequential and defer_loading apply to all tools in the toolset, and strict reached only tools added through add_function(); skipping Tool instances was undocumented behavior.
Migration: To keep a tool out of a toolset default, add its function with add_function() or @toolset.tool and pass the value explicitly, or remove the default from the toolset and set it on each tool that needs it. Give each toolset its own Tool instance when they shouldn't share defaults. For a realtime agent, drop defer_loading from the toolset.
Release note
FunctionToolset's strict, include_return_schema, sequential and defer_loading now apply to Tool instances passed to the constructor or add_tool(), as they already did for functions. A Tool built with sequential=False or defer_loading=False still gets the toolset's True. The values are set on the Tool instance, so a Tool shared with another toolset or agent gets them too. A realtime session holding a Tool from a FunctionToolset(defer_loading=True) now raises UserError. Temporal and DBOS workflows that started before the upgrade keep listing those tools without the toolset's sequential and defer_loading, wherever the tools are held, so they still replay or recover. A Prefect flow retried across the upgrade re-executes the model requests and tool calls of runs holding such a Tool, since their cache keys include the tool definitions. The dbos extra now requires dbos>=3.4.0.
New public surface
none
User-visible behavior
toolset = FunctionToolset(
[Tool(my_tool)], strict=True, sequential=True, defer_loading=True, include_return_schema=True
)
toolset.tools['my_tool'].tool_def
# before: strict=None, sequential=False, defer_loading=False, include_return_schema=None
# after: strict=True, sequential=True, defer_loading=True, include_return_schema=True
A function added with add_function(..., sequential=False) or @toolset.tool(defer_loading=False) still opts out, and a Tool built with strict=False or include_return_schema=False keeps its value.
Verification
test_function_toolset_defaults_apply_to_toolfails onmainand passes here, for both the constructor andadd_tool().test_function_toolset_sequential_defer_loading_true_overrides_tool_falsepins that the toolset'sTruebeats aTool'sFalse, and that an explicitadd_function(..., False)survives.test_function_toolset_strict_include_return_schema_fill_when_nonepins that the nullable defaults fill only unsetToolvalues.test_function_toolset_include_return_schema_false_overrides_capability_for_toolpins that a toolset'sinclude_return_schema=FalsebeatsIncludeToolReturnSchemasfor aTool, as for a function.test_agent_realtime_session_rejects_a_deferred_toolnow also covers aToolin aFunctionToolset(defer_loading=True).test_function_toolset_defaults_on_tool_instances_replayrecords a workflow without the patch marker and one with it, forsequential,defer_loading, aToolthat another toolset made sequential, andTools whose ownpreparemakes them sequential: without the marker, the toolset's value is left out beforeprepareruns, so the first three dispatch both tool calls at once and the last runs them one at a time, as onmain; with it, the toolset's value applies; both replay. Locally, the Temporal, DBOS and Prefect toolset wrappers report the same four values outside a workflow and in a Temporal workflow that records the patch marker. Temporal histories recorded onmainwithFunctionToolset([Tool(a), Tool(b)], sequential=True)ordefer_loading=True, and two tool calls, replay on this branch, through bothTemporalDurabilityandTemporalAgent, as does one where an agent holds aToolthat aFunctionToolset(sequential=True)also holds; onef940edc00, before the patch gate, they fail withTMPRL1100.test_dbos_function_toolset_defaults_on_tool_instances_recoverdoes the same for DBOS: it crashes a workflow without the patch marker and one with it, for the same four cases and forDBOSAgent, and both resume. Locally, workflows recorded onmainthat failed to recover on28effe7da6(DBOSUnexpectedStepErrorwith tools that make steps, swapped results with a shared step function, and stalenot available yethistory underdefer_loading) recover on this branch.test_dbos_tool_instance_defaults_patch_interruptedpins that a run whosepatch_asynccall another run interrupts lists the tools as onmain, records no marker, and recovers the same way. Locally, with a 50 ms probe, two concurrent runs in one workflow, of which one or both hold such a tool, completed every time.
What changes for existing users
Tool instances in a FunctionToolset with these defaults now get them, like the toolset's functions already did, and the dbos extra needs dbos>=3.4.0.
PR decisions
2026-11-05 · adopted PR #12572 at 2026-11-05 · iter -
- Decision: Branch-context bootstrapped from existing PR + issue(s). Decisions prior to this entry are backfilled from resolved threads.
- Why: PR opened by pydanty; adopted instead of opening a duplicate
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 84fafb8a-e431-4029-809b-34d3fccf1ca9
2026-11-05 · review-branch w1: keep add_function's inline strict/include_return_schema resolution · iter -
- Decision: Skip the code-reuse dedup: add_function keeps resolving all five toolset defaults in one block before building the Tool.
- Why: Net-neutral: Tool reads strict/include_return_schema lazily so dropping them changes no value, but it splits add_function's default resolution across two methods.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6646623087
- Session: 84fafb8a-e431-4029-809b-34d3fccf1ca9
2026-11-05 · review-branch w1: no new pause/resume test for Tool instances · iter -
- Decision: Skip the suspend-resume test request: the PR changes only the flags add_tool sets; approval pause/resume and deferred reveal already run on the same Tool type that add_function builds.
- Why: Net-neutral: no Tool-instance-specific path exists past add_tool; test_toolset_requires_approval_applies_to_tool_instances covers the approval pause for Tool instances.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6646623087
- Session: 84fafb8a-e431-4029-809b-34d3fccf1ca9
2026-11-05 · review-branch w1: Temporal in-flight replay verified · iter -
- Decision: A Temporal history recorded on the merge base with FunctionToolset([Tool(a), Tool(b)], sequential=True) and two parallel calls replays on the base and fails on the head with TMPRL1100 nondeterminism; disclose in the compatibility warning.
- Why: Integration-impact finding was UNSETTLED; local record/replay settles it (script: local-notes/temporal-replay-12557.py).
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6646623087
- Session: 84fafb8a-e431-4029-809b-34d3fccf1ca9
2026-11-05 · shared Tool defaults: option A (keep in-place write, disclose) · iter -
- Decision: David chose A: add_tool keeps writing the toolset's strict/include_return_schema/sequential/defer_loading onto the passed Tool; the compatibility warning discloses that a Tool shared across toolsets picks them up, as #12378 did for requires_approval.
- Why: Consistent with #12378; toolset.tools[name].tool_def keeps reflecting the defaults. B (copy on add) reverses #12378 and widens scope; C (resolve at listing) breaks the observable #12557 checks.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6646623087
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · follow-up issue for add_tool mutating shared Tool instances: yes · iter -
- Decision: David said yes: file a follow-up bug issue (file-followup-issue skill, plain bug wording) about add_tool changing Tool objects other toolsets share, covering all six fields, and link it in the PR body.
- Why: Option A leaves the shared-instance mutation in place; the issue tracks it instead of widening this PR.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6646623087
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · defer: add_tool mutates Tool instances shared across toolsets · iter -
- Decision: Filed as #12617 instead of fixing here; unrouted (no pydanty:triage-issue, no assignee) pending David's route call.
- Why: Out of scope for this PR: the fix changes add_tool storage for all seven fields and reverses #12378's same-object decision.
- Source: https://github.com/pydantic/pydantic-ai/issues/12617
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · pre-push review 1 of 3 at 2d817e3281 (reserved) · iter -
- Decision: Dispatched: fresh claude -p (haiku, light tier) from a policy-base checkout at c8bdab333f; outcome appended separately.
- Why: Reviewed tree 132f12151c22760b9a8cb12a70e4f90e53b0125d; scope full branch a5e02e2722..2d817e3281; first substantive pre-push review.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · pre-push review 1 of 3 at 2d817e3281: outcome · iter -
- Decision: remediated in PR body only (strict was not documented as applying to all tools on main); skipped the pragma finding (test_tools.py marks uncalled tool bodies with pragma no cover throughout) and the Temporal workflow-test finding (engine sites are import/annotation-only; wrappers surface the four values, verified locally).
- Why: Reviewed tree 132f12151c22760b9a8cb12a70e4f90e53b0125d, scope a5e02e2722..2d817e3281; tree unchanged by the remediation, so no further pre-push dispatch needed.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · Temporal in-flight replay also breaks under defer_loading=True · iter -
- Decision: A Temporal history recorded on the merge base with FunctionToolset([Tool(a), Tool(b)], defer_loading=True) and two calls replays on the base and fails on 2d817e3281 with TMPRL1100 (the head refuses the call to the now-deferred tool, so no call_tool activity is scheduled); disclose next to the sequential case.
- Why: Found while weighing the #9701 workflow.patched precedent; local record/replay settles it (script: local-notes/temporal-replay-defer-12557.py).
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · review-branch w2: no wire-capture VCR test for the four defaults · iter -
- Decision: Skip the request_capture VCR test request; add a Not-a-VCR-test line to each new test instead.
- Why: Net-neutral: the PR changes which ToolDefinition values FunctionToolset registers, not any provider's mapping of them; the provider suites already pin how strict/include_return_schema/defer_loading reach the wire.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · review-branch w2: no per-engine durable test for Tool-instance defaults · iter -
- Decision: Skip the per-engine durable test request (Temporal, DBOS, Prefect).
- Why: Net-neutral: the engine sites for FunctionToolset are import/annotation-only and each wrapper serves the wrapped toolset's tool_def; local-notes/durable-check-12557.py shows Temporal, DBOS and Prefect reporting the four values on the head and dropping them on main.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · defer: FunctionToolset docstring for docstring_format/require_parameter_descriptions/schema_generator · iter -
- Decision: Filed as #12623 instead of fixing here (wave-3 claim-check RESCOPED it: pre-existing lines, untouched by this diff).
- Why: Out of scope: the wording predates this PR; verified at runtime that require_parameter_descriptions=True raises for a function and not for a Tool.
- Source: https://github.com/pydantic/pydantic-ai/issues/12623
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · pre-push review 2 of 3 at eb3c654a68 (reserved) · iter -
- Decision: Dispatched: fresh claude -p (haiku, light tier) from a policy-base checkout at c8bdab333f; outcome appended separately.
- Why: Reviewed tree 4b0cce61950890d38bbdf29f27b4d474259d6813; follow-up scope 2d817e3281..eb3c654a68 (tests, docs/toolsets.md) plus the PR body's updated compatibility warning; full branch diff as context.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · pre-push review 2 of 3 at eb3c654a68: outcome · iter -
- Decision: remediated: moved the IncludeToolReturnSchemas import in the new test to the module's top-level capabilities import (agent_docs/index.md: imports at the top). Prior finding (PR body strict claim) verified fixed.
- Why: Reviewed tree 4b0cce61950890d38bbdf29f27b4d474259d6813, scope 2d817e3281..eb3c654a68; the remediation is a test-only delta, exempt from another review (test code only, affected tests rerun), chaining from eb3c654a68.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · final metadata check at ef940edc00 · iter -
- Decision: Applied all five corrections: added topic labels deferred-tools, temporal, durable exec, realtime; removed the decisions-log marker comment from the PR body's decisions block.
- Why: Fresh light-tier checker against pushing-commits-to-the-repo, root AGENTS.md and the PR template; each correction verified against its cited rule.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · Temporal replay gate question routed to DouweM · iter -
- Decision: David routed the disclose-vs-workflow.patched question to DouweM: posted it as a plain PR comment and requested his review (no @-mention in agent text).
- Why: #9701 precedent gated a replay-visible bug fix; the call is the maintainer's. Option chosen by David: request review.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6662956618
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-05 · Temporal replay: option A (disclose), not a workflow.patched gate · iter -
- Decision: David: "if we're doing it only for temporal, really, then lets go with the recommendation (A)". A research pass found no consumer besides the Temporal gate for a toolset-default provenance record; #12617's fix (copy-on-add or listing-time resolution) would hold that record anyway.
- Why: B would add Temporal-only tracking to a core toolset that #12617 would rework; DBOS/Prefect/harness engines have no patch gate pydantic-ai uses.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6662956618
- Session: 69d9a9e3-8c49-4143-ab11-1316b75c010e
2026-11-07 · Temporal replay: option B (workflow.patched gate), DouweM's call · iter -
- Decision: DouweM rejected A ('far easier said than done by someone handling a package update and deploy ... So I much prefer the patched route'); David chose to build the workflow.patched() gate in this PR, for the replay-visible sequential and defer_loading defaults only.
- Why: Draining workflows on upgrade is the pain that pins users to old versions; DBOS/Prefect have no patch gate and stay disclosed.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6695572879
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
- Supersedes: Temporal replay: option A (disclose), not a workflow.patched gate
2026-11-07 · pre-push review 3 of 3 at 1fc42a419d (reserved) · iter -
- Decision: Dispatched: fresh claude -p (opus, strong tier: hosted review has commented on two earlier pushes) from a policy-base checkout at bbd5327dcf; outcome appended separately.
- Why: Reviewed tree 0b79d7f8c6886d70a044bd0167ea483667e4c49d; follow-up scope eb3c654a68..1fc42a419d (the Temporal workflow.patched gate, its test, docs line, manifest regen) plus the updated PR body; full branch diff as context.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-07 · pre-push review 3 of 3 at 1fc42a419d: outcome · iter -
- Decision: Findings: (1) shared Tool missed by the gate — reproduced (TMPRL1100 on a merge-base history of an agent holding a Tool that another FunctionToolset(sequential=True) also holds); remediated per David's call below. (2) TemporalAgent gate unproven — refuted: TemporalAgent merge-base histories fail with TMPRL1100 on ef940edc00. (3) PR decisions block stale — re-rendered from the local log. (4) verification bullets — test link anchored, durable-wrapper bullet qualified.
- Why: Reviewed tree 0b79d7f8c6886d70a044bd0167ea483667e4c49d, scope eb3c654a68..1fc42a419d; budget exhausted, so remediation is checked locally and pushed without a fourth review.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-07 · shared Tool and the Temporal gate: record provenance on the Tool · iter -
- Decision: David chose 'Record it on the Tool': add_tool marks the Tool itself (two private fields) when it sets sequential/defer_loading from the toolset, and the gate reads the mark from whichever toolset lists the Tool, so every holder of a shared Tool replays pre-upgrade histories.
- Why: A toolset-local record misses another toolset or agent holding the same Tool (reproduced); the alternative was disclosing that gap.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6695572879
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-07 · Tool provenance flags: unannotated class attributes, not dataclass fields · iter -
- Decision: Tool._sequential_from_toolset/_defer_loading_from_toolset are plain class attributes defaulting to False, set per instance by add_tool.
- Why: As defaulted dataclass fields they broke a dataclass subclass of Tool adding a required field (tests/test_tools.py::test_dynamic_cls_tool: non-default argument follows default argument) and changed dataclasses.fields(Tool).
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-07 · main merge at 28effe7da6: manifest conflict regenerated · iter -
- Decision: Merged upstream/main (52357f8faa); resolved the only conflict, scripts/durable_exec_contract.json, by regenerating it with scripts/durable_exec_contract.py --write; branch diff outside the manifest is identical to 1cbb2e7c0b's.
- Why: PR was DIRTY so CI never ran on 1cbb2e7c0b; review budget exhausted after review 3, so pushed after local checks (manifest test, Temporal replay test, tests/test_tools.py pass).
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-07 · final metadata check at 28effe7da6 · iter -
- Decision: Applied: New public surface reads 'none' (skill: Write none when there is none). Skipped: dropping the R anchors from Files-changed test links.
- Why: Fresh light-tier checker against pushing-commits-to-the-repo, root AGENTS.md, the PR template and the label catalog; labels and title current. The Files-changed link already survives pushes; the line anchor is what lands a reader on the test in a 2300-line file.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-08 · pydanty review at 28effe7da6: DBOS recovery across the upgrade reproduced · iter -
- Decision: Reproduced (local-notes/dbos-recovery-12557.py, old=52357f8faa, pinned and unpinned app version): sequential=True with tools that make DBOS steps raises DBOSUnexpectedStepError on recovery (or silently swaps results when they share a step function); plain tools are safe. defer_loading=True: tools with steps raise; plain tools complete but the history records 'Tool a is not available yet' for calls that already ran. Prefect, by inspection: model-request task keys include tool defs, so a retried flow re-runs model requests once (no error). DBOS.patch exists in dbos 2.10 but raises unless the user's DBOS config sets enable_patching=True.
- Why: Pydanty findings 1-3 claimed the DBOS/Prefect gap without a probe; scope decision needs the evidence. Finding 4 (lambda) skipped: fails pyright reportUnknownLambdaType, same named stub in test_durability.py. Finding 5 (docs) skipped: no docs page covers these constructor options for any tool; the FunctionToolset docstring does.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6713889110
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-08 · DBOS/Prefect replay question routed to DouweM and Qian Li · iter -
- Decision: David: ask on the PR, note that our upgrade guidance differs by engine (Temporal patched gate vs DBOS/Prefect warnings), and tag Qian Li (qianl15, DBOS co-founder) for what DBOS prefers here and for the other warn-only DBOS changes. Posted with the repro collapsed; DouweM already a requested reviewer (no @-mention).
- Why: Pydanty findings 1-3 reproduced for DBOS; gating DBOS needs DBOS.patch, which pydantic-ai never used and which needs enable_patching=True on dbos 2.10.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · main conflict at 28effe7da6: hold the merge until the DBOS answer · iter -
- Decision: Manager for David: PR is DIRTY again (main moved, #12958 and others). 'Don't resolve it yet. Merge main as part of the next push, after DouweM or Qian answer the DBOS question, so douwebot only re-reviews once. Stay in monitor mode.'
- Why: One push, one douwebot re-review: the DBOS answer may add code anyway.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · DBOS: gate with DBOS.patch like Temporal, raise dbos floor to 3.4.0 · iter -
- Decision: David (11-10, manager channel): gate DBOS the way the PR gates Temporal, and raise the DBOS floor to make that possible. dbos>=3.4.0: DBOS.patch/patch_async no longer require enable_patching there (3.3.0 still raises 'enable_patching must be True'); 3.4.0 also first ships DBOS.reserve_step for #12962. Merge the held main conflict in the same push.
- Why: Answers the DBOS question at issuecomment-6716017384; the reproduced DBOS recovery failures (DBOSUnexpectedStepError, swapped results, 'not available yet' history) get the same no-drain upgrade as Temporal.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · push held: David re-confirming the dbos>=3.4.0 floor · iter -
- Decision: Manager for David: 'Hold the push. Keep working locally, but don't push or post anything until I confirm.' #12962 research found DBOS.reserve_step can't fix #12962, so the floor bump rests only on this PR's DBOS.patch gate.
- Why: The floor is a shipped constraint; it needs its own justification now that #12962 doesn't use it.
- Source: https://github.com/pydantic/pydantic-ai/issues/12962
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · dbos>=3.4.0: drop the fallbacks the floor makes dead · iter -
- Decision: Raised pydantic_ai_slim's dbos extra to >=3.4.0 (hand-edited: uv add can't write the uv-dynamic-versioning optional-dependencies hook table, then uv lock). Removed SnapshotStepReservation and the hasattr(DBOS, 'reserve_step') branch (#12555's TODO(v3) markers), the root pytest LoggingHandler filter (TODO(v3) dbos>=2.31.0), tests/conftest.py without_admin_server (DBOS 2.x admin server), and test_dbos.py's dbos<2.27 / <2.14 skipifs. Private-API imports #12555 scoped out stay.
- Why: #12555's decisions log: shipped floor raises each 'bought a feature or fixed a break' (#4077, #6639, #11071, #4863); this one buys DBOS.patch_async without enable_patching, which the DBOS gate needs. The lowest CI leg runs 3.4.0, so the fallbacks would be uncovered dead code.
- Source: https://github.com/pydantic/pydantic-ai/pull/12555
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · DBOS gate: patch_async when the run enters its toolsets, once per workflow · iter -
- Decision: ToolInstanceDefaultsGateToolset wraps each FunctionToolset holding a toolset-defaulted Tool (DBOSDurability.get_wrapper_toolset per run; DBOSAgent at construction). Its aenter calls DBOS.patch_async once per workflow execution (shared task keyed by DBOSContext); get_tools reads the result. Not in get_tools: CombinedToolset lists toolsets with asyncio.gather, so the probe would race MCP get_tools steps. Not in prepare_tools: it sees ToolDefinitions only, without the Tool provenance.
- Why: CombinedToolset.aenter enters toolsets one at a time, after the run's run_start_time step and before any model or MCP step. Verified: old->new recovery for seq/defer x steps/shared/plain/_events succeeds; new->new records the marker at step 1. Concurrent runs in one workflow where only one holds such a tool raise DBOSPatchNondeterminismError once the probe takes ~50ms (local-notes/dbos-concurrent-12557.py --slow-probe); both holding one share the probe and pass.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · dbos>=3.4.0 floor confirmed · iter -
- Decision: David (11-10, manager channel) keeps dbos>=3.4.0 plus the DBOS.patch gate. Also: concurrent fresh runs in one workflow raising DBOSPatchNondeterminismError is a regression to fix, not document ('documenting a behavior change doesn't make it acceptable'); evaluate D (catch and fall back), E (carry the gate in an existing step), B (wait for a pending patch).
- Why: #12962 no longer uses DBOS.reserve_step, so the floor rests on the patch gate alone.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · DBOS gate concurrency: D/E/B/H evaluated, recommendation D pending David · iter -
- Decision: Repro local-notes/dbos-concurrent-recovery-12557.py (two runs in one workflow, record then os._exit, recover; --slow-probe = 50ms probe; --plain = tools without steps). main baseline: fresh always works; recovery fails 6/6 with step tools, 4/8 with plain tools. D (catch DBOSPatchNondeterminismError, fall back without marker): fresh 16/16 ok; extra recovery failure when the fresh probe recorded a marker and a sibling step starts during the recovery probe (step 1 DBOS.patch recorded when second__model.request expected). H (sync sys_db.patch on the loop, private API): fresh 16/16, no marker-position failures. E out: run_start_time only recorded with timeout=, model step output can't carry it rollback-safely. B not built.
- Why: Manager: the fresh-run raise is a regression to fix, not document.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · DBOS gate concurrency: D (catch and fall back), not H · iter -
- Decision: David (11-10, manager channel) picked D: when DBOS.patch_async raises DBOSPatchNondeterminismError on a run, catch it and list the tools as main does, with no marker. Rejected H (one blocking sys_db.patch call on the event loop): it depends on DBOS private internals and blocks the event loop. D still fails one recovery case: concurrent runs in one workflow, marker recorded fresh, a sibling step starting during the recovery probe; main already fails most such recoveries.
- Why: Fresh concurrent runs raising was a regression from main; D removes it with DBOS's public API.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6716017384
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
- Supersedes: DBOS gate concurrency: D/E/B/H evaluated, recommendation D pending David
2026-11-10 · push at ac540e08f2: DBOS gate + floor + main merge, no fourth pre-push review · iter -
- Decision: Pushed the held work in one push: dbos>=3.4.0 and dead-fallback removal (ba32733abe), the DBOS gate (b7668b3df5), the D fallback test and docs (40615f6a00), and two main merges (fde4f875a5, ac540e08f2; no conflicts, contract manifest unchanged). No fourth pre-push review: budget exhausted at review 3 of 3; CI and douwebot review the gate.
- Why: Manager for David (11-10): 'Then do the one push ... and continue your lifecycle.' Local checks pass: tests/durable_exec/test_dbos.py in full, DBOS workspace/online-eval/durable-operation, contract manifest and touched, tests/test_tools.py, Temporal tool_instances tests.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · Macroscope: gate reverts sequential/defer_loading after the Tool's prepare — reproduced, pending David · iter -
- Decision: Reproduced (local-notes/prepare-gate-12557.py, main=52357f8faa export vs ac540e08f2): Tool(prepare=...) returning sequential=True/defer_loading=True in FunctionToolset(sequential=True, defer_loading=True) lists True/True on main but False/False in the head's pre-upgrade listing (tools_before_tool_instance_defaults runs after prepare). Affects the Temporal and DBOS gates. Passthrough prepare and no prepare match main. Fix design pending David.
- Why: Same replay/recovery break the gates exist to prevent, for tools whose prepare forces the value.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4529748472
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · CI fix at 1dde60a5cf: harness DBOS tests still imported without_admin_server · iter -
- Decision: CI on ac540e08f2 failed at collection in 14 tests/harness DBOS modules (ImportError: without_admin_server, removed with the dbos>=3.4.0 floor). Passed config directly; the 14 files pass locally. Pushed as an exempt test-only delta chaining from ac540e08f2.
- Why: The earlier removal grepped tests/durable_exec only; git grep over the repo now finds no caller.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/42889172449
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · CI fix at 974de9343a: stale gh-aw runner lock · iter -
- Decision: quality checks on 1dde60a5cf failed 'Stale gh-aw runner lock'; ran uv lock --script .github/scripts/pydantic-ai-runner (one line: dbos specifier >=3.4.0). Exempt delta: output of the repo's own tooling, chaining from ac540e08f2.
- Why: The runner lock records pydantic_ai_slim's requires-dist, which the dbos floor changed.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/42890526314/job/130090507298
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · Internal review: DBOS gate cache never freed its entries — reproduced, fixed · iter -
- Decision: Reproduced (local-notes/dbos-gate-leak-12557.py): one _tool_instance_defaults_patched entry per finished workflow (1, 2, 3), because the stored asyncio.Task keeps its copied contextvars Context, which holds the DBOSContext key. Fix: once the shared probe finishes, store its bool instead of the task; repro then shows 0 after each workflow. Test: test_dbos_tool_instance_defaults_patch_freed_with_workflow (also covers a later run reading the cached bool).
- Why: Memory grows per workflow in a long-lived worker that runs agents holding toolset-defaulted Tools.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4529804288
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · Tool prepare vs the replay/recovery gates: B (undo defaults before prepare) · iter -
- Decision: David (11-10, manager channel) picked B: Tool.prepare_tool_def undoes the toolset-set sequential/defer_loading before calling prepare, via a private flag (ContextVar) that only the Temporal and DBOS gates set while they list tools; replaces tools_before_tool_instance_defaults. Rejected: A (re-run prepare inside the gate: prepare runs twice per listing and the gate copies FunctionToolset's per-tool run-context code) and C (document the gap). This was the PR's second regression (the first: patch_async raising on fresh concurrent runs); David chose to continue.
- Why: Reproduced: Tool(prepare=...) forcing sequential/defer_loading=True lists True on main and False in the head's pre-upgrade listing, so such workflows can't replay or recover.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4529748472
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
- Supersedes: Macroscope: gate reverts sequential/defer_loading after the Tool's prepare — reproduced, pending David
2026-11-10 · B implemented: ContextVar read in Tool.tool_def, set only by the gates' listing scope · iter -
- Decision: tools._without_toolset_sequential_defer_loading (ContextVar, default False) is read in the Tool.tool_def property, which prepare_tool_def passes to prepare; durable_exec._toolset.listing_tools_before_tool_instance_defaults() sets it around the Temporal gate's and the DBOS gate's listing. DurableFunctionToolset's post-listing tools_in_durable_context hook (added by this PR) became listing_in_durable_context, a scope factory. Temporal now calls workflow.patched() whenever the toolset holds such a Tool, as DBOS does. Placed in tool_def, not prepare_tool_def, so a Tool subclass overriding prepare_tool_def from self.tool_def is covered too.
- Why: Repro (local-notes/prepare-gate-12557.py) now matches main for forced/passthrough/no prepare. Flag unset: tests.refactor_capture HEAD vs working tree over 8 nodes (test_tools dynamic/defaults, test_capabilities prefix metadata, test_tool_availability reveal): 17 records each side, 0 differing.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4529748472
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · dead DBOS 2.x log cleanup: delete detach_dbos_logging and callers · iter -
- Decision: Manager (11-10), under the earlier instruction to remove what the dbos>=3.4.0 floor makes dead: delete tests/conftest.py detach_dbos_logging, the inline DBOSLogTransformer loop in tests/durable_exec/test_dbos_workspace.py, and their callers; no pragma.
- Why: coverage on 9d485150d2 missed their loop bodies: DBOS 3.4.0's destroy() runs teardown_logger, and it attaches handlers/filters to all loggers only on DBOS Cloud (dbos-transact-py#871 closed).
- Source: https://github.com/dbos-inc/dbos-transact-py/issues/871
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · runner lock stays on this PR (K) · iter -
- Decision: David (11-10, manager channel): keep .github/scripts/pydantic-ai-runner.lock's one-line re-lock on this pydanty-authored PR; reply on the Protect .github guard comment that a maintainer authored and pushed it and the dbos>=3.4.0 floor needs it.
- Why: The .github Directory Guard is not a required check (main's ruleset requires only 'check'); moving the floor and lock to a separate PR would leave this PR's DBOS gate on a floor main lacks.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6777977878
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · pre-push review 4 at 5583bd14b0 (reserved; authorized over budget by David) · iter -
- Decision: David (11-10, manager channel) authorized one more fresh strong-tier review past the 3-review budget, for 5cfd742207 plus 5583bd14b0. Dispatched: fresh claude -p (opus) from a policy-base checkout at 170457fbbf; outcome appended separately.
- Why: Reviewed tree 6b3d7cfc53f1c0a261827c9881a80bdd0d02a438; scope 9d485150d2..5583bd14b0 (core Tool.tool_def ContextVar, gate listing scopes, dead DBOS log cleanup removal); last reviewed 1fc42a419d; full branch diff as context.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · pre-push review 4 at 5583bd14b0: no review (reviewer hit the session limit) · iter -
- Decision: The claude -p reviewer exited with 'You've hit your session limit · resets 7:40pm (America/New_York)' and produced no findings or verdict; candidate and policy-base trees unchanged. Rerun of the same authorized review queued for after the reset (00:45Z), same bundle and policy-base 170457fbbf.
- Why: David authorized one review; this attempt never ran, so the rerun is that review, not another.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · pre-push review 4 at 5583bd14b0: outcome · iter -
- Decision: Rerun completed (David lifted the usage limit). Two findings, both remediated in 15cd15119a: the Tool.tool_def flag comment had dangling 'them' and misnamed who drops the values (reworded per the reviewer); one 171-char docstring line in test_dbos_function_toolset_defaults_on_tool_instances_recover (rewrapped). Reviewer checked and found fine: one ContextVar across Temporal's sandbox passthrough, no durable read of Tool.sequential/defer_loading outside listing, dynamic toolsets need no gate, detach_dbos_logging dead under dbos 3.4.0, PR body anchors current.
- Why: Reviewed tree 6b3d7cfc53f1c0a261827c9881a80bdd0d02a438, scope 9d485150d2..5583bd14b0; remediation is comments/docstrings only (exempt), chaining from 5583bd14b0.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · push at 42eeb46b0d: B, dead log cleanup, review-4 remediation, main merge · iter -
- Decision: Pushed 5cfd742207 (B), 5583bd14b0 (dead DBOS log cleanup), 15cd15119a (review-4 comment/docstring fixes, exempt) and merge 42eeb46b0d (upstream/main fe3bf389c4). Only conflict: tests/harness/step_persistence/test_durable_step_persistence.py imports — kept main's lookup_twice import, dropped the removed helpers; locks check clean, contract manifest unchanged.
- Why: Post-merge checks pass: step-persistence, replay telemetry, contract manifest/touched, test_tools, Temporal toolsets/durability, DBOS tool_instance tests.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-10 · Macroscope: cancelled waiter left the probe task in the DBOS gate cache — reproduced, fixed locally · iter -
- Decision: Reproduced (local-notes/dbos-gate-cancel-leak-12557.py): a run cancelled while awaiting asyncio.shield(probe) left the finished Task (and its DBOSContext) in _tool_instance_defaults_patched: 1 entry after the workflow. Fix: the probe coroutine itself replaces its cache entry with its bool result (finally: del, then set), so no waiter has to survive; repro shows 0, and the three-workflow leak repro still 0. Test: test_dbos_tool_instance_defaults_patch_freed_after_cancelled_run.
- Why: Same per-workflow leak as the entry above, through cancellation. A runtime change after the authorized review 4; push needs David's call on review.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4531907966
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-11 · unmet review gate at ed8b56114f · iter -
- Decision: David (11-11, manager channel) picked P: push ed8b56114f (DBOS gate probe replaces its own cache entry; Macroscope cancelled-waiter leak) without a local pre-push review; douwebot reviews the final head.
- Why: Runtime change after the authorized review 4 at 5583bd14b0; the 3-review budget was spent. Locally: the new test fails on the prior source and passes with the fix; DBOS tool_instance tests pass; both leak repros show 0 entries.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4531907966
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-11 · PR Review Checks on 42eeb46b0d: infra failure, no review · iter -
- Decision: Both review jobs (general, tests-and-dependencies) failed in 'Set up OpenCode and review tools': apt could not resolve azure.archive.ubuntu.com while installing ripgrep (exit 100); status 'No result'. The run on ed8b56114f (43092081744) is the retry; rerun once more if it fails the same way, then escalate.
- Why: pushing-commits-to-the-repo: a 'No result' failure has no finding to triage; rerun once, then escalate.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43044696008
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-11 · CI fix at 1388d1645f: two new main DBOS harness tests used the removed helpers · iter -
- Decision: CI on ed8b56114f (merge ref) failed collecting tests/harness/permissions/test_dbos.py and tests/harness/refine_output/test_dbos.py, added on main after 42eeb46b0d, which import detach_dbos_logging/without_admin_server. Merged upstream/main (c840e10cd8, clean; dbos floor, locks and manifest intact) and dropped the helpers there (1388d1645f). Exempt delta: test-only plus a conflict-free main merge, chaining from ed8b56114f.
- Why: Those files pass locally with the other harness DBOS, DBOS gate, Temporal gate and contract-manifest tests.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43092087452
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · stuck queued runs at 1388d1645f: David cancels and reruns them · iter -
- Decision: All 9 workflow runs for 1388d1645f stayed queued from 20:18Z (GitHub-side; other PRs pushed 20:18-20:54Z stuck too). Auto mode denied gh run cancel ('Interfere With Workloads'). David (11-12, manager channel) picked A and runs the cancel/rerun from his own shell; this lane does not cancel, rerun or push for it.
- Why: Runs created after 20:54Z ran normally, so the stuck batch is orphaned; an empty commit would have cancelled the same runs.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43095280165
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · main merge at 7b14ebf35d to replace the stuck runs · iter -
- Decision: David's own cancel/rerun failed (GitHub: 'Cannot cancel a workflow run that is completed', then 'cannot be rerun; This workflow is already running'; runs still list queued with no jobs). David: 'update the branch' (relayed 11-12: merge upstream/main instead of an empty commit). Merged upstream/main 92300c2e09 (7b14ebf35d), no conflicts, no pyproject.toml/uv.lock change. Exempt delta: target-branch merge without conflict resolution, chaining from ed8b56114f; git diff upstream/main...1388d1645f equals upstream/main...HEAD apart from hunk headers and index lines.
- Why: A later push on durable-approvals started fresh CI normally while its 20:54Z run stayed stuck; ci.yml, bots.yml and pr-review-checks.yml cancel in-progress runs on synchronize. Contract manifest, runner lock and pyright on the merged durable/tools files are clean.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43095280165
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot at 7b14ebf35d: Prefect upgrade note added (blocking) · iter -
- Decision: Do: docs/durable_execution/prefect.md gets a 'Tool instance cache keys changed' warning beside the existing cache-key upgrade warnings, and the PR body's compatibility warning and release note gain a Prefect sentence. Covers all four values, not only sequential/defer_loading: scratchpad prefect_key_check.py shows the model-request cache key changes for each of strict, include_return_schema, sequential and defer_loading.
- Why: Prefect has no patch gate; the standing decision was 'DBOS/Prefect ... stay disclosed', and prefect.md documents every comparable cache-key change, but this PR had no Prefect note.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#pullrequestreview-5875235544
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot at 7b14ebf35d: workflow_context() stays in the gate module (optional) · iter -
- Decision: Skip: move workflow_context() into dbos/_utils.py and reuse it in DBOSDurability.get_default_run_id.
- Why: Net-neutral: two call sites, and get_default_run_id also asserts workflow_id; changing it refactors main code this fix doesn't otherwise touch (AGENTS.md: a reviewer finding is not a license to enlarge scope). The private dbos._context import stays among those #12555 scoped out.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4551036416
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot at 7b14ebf35d: one patch name per engine module (optional) · iter -
- Decision: Skip: define the shared 'pydantic_ai:function_toolset_defaults_on_tool_instances' patch name once in durable_exec/_toolset.py.
- Why: Net-neutral: each string is a marker persisted in that engine's histories and can't change once released, so the two can't drift; one constant only moves the string.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4551036443
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · push at 8b8d9403c2: Prefect docs note, no local review (budget exhausted) · iter -
- Decision: Pushed 8b8d9403c2 (docs/durable_execution/prefect.md warning only) on top of 7b14ebf35d without a local pre-push review: the 3-review budget plus David's authorized review 4 are spent; douwebot re-reviews the new head.
- Why: A docs/** page is not an exempt delta; budget exhaustion is a path the skill lets the implementing agent take. Docs model-alias, navigation, parity and Prefect example tests pass; pre-commit passed.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#pullrequestreview-5875235544
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · PR Review Checks on 8b8d9403c2: provider rate limits, rerun once · iter -
- Decision: PR Review Check (general) failed in 'Review with OpenCode': opencode-go/deepseek-v4.1-flash provider.go-limit 429, then zai-coding-plan/glm-5.3-flash provider.rate-limit 429; no review produced. tests-and-dependencies passed. Reran the failed job once (attempt 2); escalate if it fails the same way. The same check passed on 7b14ebf35d.
- Why: pushing-commits-to-the-repo: a tooling failure has no finding to triage; rerun once, then escalate.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43228398492/job/131218010472
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · PR Review Checks on 8b8d9403c2: rerun passed · iter -
- Decision: Attempt 2 of run 43228398492 passed: general and tests-and-dependencies succeeded, gate succeeded, no comments posted.
- Why: Closes the rate-limit rerun entry above.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43228398492
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot on 8b8d9403c2: install failure, label re-applied once · iter -
- Decision: douwebot run 43231602068 produced no review: claude-code-action could not install Claude Code ('curl: (28) Failed to connect to claude.ai port 443', 3 attempts), and the subscription-limit detector correctly did not fall back to OpenCode. Re-applied the douwebot label once, as the bot's failure comment directs; escalate if it fails the same way.
- Why: Runner network failure, not a verdict on this PR (bot comment issuecomment-6825689747).
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43231602068
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot on 8b8d9403c2: retry also produced no review, escalated · iter -
- Decision: Run 43233092230 (label re-applied): the Claude job's subscription-limit detector set 'fallback', and douwebot-opencode then failed: opencode-go/deepseek-v4.1-flash provider.go-limit 429, zai-coding-plan/glm-5.3-flash provider.rate-limit 429. No review posted. Not re-applying again without the manager's call.
- Why: Two consecutive douwebot runs on this head ended without a verdict (network, then provider capacity).
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43233092230
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot on 8b8d9403c2: third run started · iter -
- Decision: Re-applied the douwebot label at 15:36Z (run 43249659260), more than 90 minutes after the provider-limit failure at 14:02Z.
- Why: Manager for David (11-12): 'carry on: CI green on 8b8d9403c2, then douwebot'; CI is green on this head and the standing instruction is to apply douwebot once CI is green.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43249659260
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-12 · douwebot at 8b8d9403c2: approved with a #12811 coordination note · iter -
- Decision: Run 43249659260 approved (engine opencode-zai) but its body carried discussion: the #12811 note (copy-on-add Tool storage reworks what the gates rely on). Verified: #12811 (85b644606b) conflicts with this branch in function.py and tests/test_tools.py. Replied that this PR stays as is and #12811 gets handled after this PR merges, on top of its Tool storage, with the Temporal and DBOS replay tests rerun against it. Re-applied the douwebot label for an approval with no discussion.
- Why: Gate: clean douwebot approval failed 'Douwebot has discussion findings on this head.' (review_gates.py: an APPROVED body must equal 'No blocking findings.' plus the engine line); merge bar: address every douwebot comment, then a clean approval on the head.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6828513763
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-13 · douwebot refuses to re-review 8b8d9403c2 · iter -
- Decision: Run 43252765434 (label re-applied after the #12811 reply) posted no review: 'douwebot did not review this head again: an earlier review left findings on it ... Push a new commit, then request a new review.' A clean approval now needs a new head; escalated to the manager.
- Why: The 8b8d9403c2 approval's discussion text counts as a finding, and douwebot won't re-review a head that has one.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6828529822
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-13 · CI fix at b9e8322979: dynamic_workflow DBOS test used the removed helpers · iter -
- Decision: David's GitHub branch update e85c7aec61 (main merge) brought tests/harness/dynamic_workflow/test_dbos.py, which imports detach_dbos_logging/without_admin_server; pyright and every test leg failed on it (one collection error each). Dropped the helpers there as in 1388d1645f. Exempt delta: test code only, chaining from e85c7aec61 (conflict-free main merge); also answers PR Review Checks' inline finding on e85c7aec61.
- Why: make install (pyproject.toml changed in the merge), pyright on the file, the four harness/durable DBOS test files and the contract manifest pass locally; git grep finds no other caller.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4566755283
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-13 · douwebot at b9e8322979: clean approval · iter -
- Decision: Run 43480758855 (engine claude) approved b9e8322979 with the bare 'No blocking findings.' body and no inline comments; Gate: clean douwebot approval succeeded ('Review requirement satisfied.').
- Why: Closes the douwebot entries for 8b8d9403c2: the new head (David's branch update plus the test fix) got a fresh review.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43480758855
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-13 · final metadata check at b9e8322979 · iter -
- Decision: Applied: added topic labels prefect (docs/durable_execution/prefect.md warning, Prefect paragraph and release note) and dependencies (dbos>=3.4.0 floor in pyproject.toml/uv.lock); folded the last Verification bullet into the Temporal replay bullet (visible body 41 -> 40 lines). Skipped: rewording decision entries (the decisions block is rendered verbatim from this log). Not ours to apply: approved:dependencies and approved:ci-config (maintainer approval labels).
- Why: Fresh light-tier checker against pushing-commits-to-the-repo, root AGENTS.md, the PR template and the label catalog; title, attribution, Closes line, test anchors and the other labels current.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-13 · main merge at 3b53d99540: sub_agents rename conflict · iter -
- Decision: Merged upstream/main fb64b4100c. Only conflict: tests/harness/sub_agents/test_dbos.py (main renamed tests/harness/subagents in #13401); kept main's renamed imports and dropped detach_dbos_logging/without_admin_server, as on the other DBOS test files. spend/ -> spend_limits/ merged cleanly. Exempt delta: test code only plus a main merge, chaining from b9e8322979.
- Why: Manager for David (11-13) picked F: the PR was DIRTY and can't merge while it conflicts. Branch diff against main is unchanged apart from the two renamed paths; contract manifest regenerates unchanged; locks check clean; pyright and the sub_agents/dynamic_workflow DBOS, contract, test_tools and DBOS/Temporal tool_instance tests pass.
- Source: https://github.com/pydantic/pydantic-ai/pull/13401
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-14 · douwebot at 3b53d99540: DBOSAgent per-run toolsets need no gate — refuted, proving test · iter -
- Decision: Skip gating DBOSAgent's per-run toolsets (douwebot's blocking finding). Repro local-notes/dbos-agent-runtime-toolsets-12557.py, main fb64b4100c export vs head: a DBOSAgent.run(toolsets=[FunctionToolset([Tool(a), Tool(b)], sequential/defer_loading=True)]) recorded on main recovers on the head exactly as on main (steps a1, b1, a2; no 'not available yet'), called directly or as a child of a user workflow; fresh head runs list the new values. Added test_dbos_agent_per_run_toolset_recovers_with_recorded_tools (013935eecd).
- Why: DBOSAgent.run is a DBOS workflow and per-run toolsets are its arguments: recovery deserializes the recorded Tool values, not the caller's rebuilt toolset. The gate would only add a DBOS.patch step. The test fails if recovery reads the live Tools (checked with a temporary variant). Test-only delta, exempt, chaining from 3b53d99540.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#discussion_r4570007709
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-14 · douwebot at 013935eecd: clean approval · iter -
- Decision: Run 43534612772 (engine claude) approved 013935eecd with the bare 'No blocking findings.' body and no inline comments; Gate: clean douwebot approval passes.
- Why: Closes the 3b53d99540 per-run toolset finding: the new head (proving test) got a fresh review.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43534612772
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-14 · manager enqueued #12572 at 013935eecd · iter -
- Decision: Manager enqueued #12572 at 2026-11-14T12:32:38Z on head 013935eecd, after adding approved:dependencies and approved:ci-config. David asked for the labels and the queue himself, with no human approval on the PR. Re-enqueue is the manager's, not this lane's.
- Why: 013935eecd met the merge bar except a human approval: CI green, PR Review Checks passing, clean douwebot approval, no open threads, no conflict with main.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-14 · merge queue removed #12572 at 013935eecd: DBOS cache tests raced DBOS's thread pool · iter -
- Decision: Merge-group CI 43595369725 failed two jobs. (1) test durable-exec on 3.11 (lowest), a merge-queue-only leg: test_dbos_tool_instance_defaults_patch_freed_after_cancelled_run, assert 1 == 0 on the gate cache's length after gc.collect. Reproduced by a plugin that keeps a finished thread-pool work item 200 ms longer: both cache tests fail; without it they pass (20/20 on 3.11 lowest). Cause: DBOS.patch_async probes in asyncio.to_thread, whose worker can still hold its copy of the workflow's context after the workflow returns. Fixed in the tests (new head): each asserts inside the workflow that the cache holds the bool, not the probe task, after the probe; renamed to ..._cache_holds_its_result[_after_cancelled_run]. Both fail on a mutant that leaves the task in the cache. (2) test on 3.11 (lowest-versions, shard 1/2): test_supervisor_output_bound_preserves_captured_prefix, known flake #12717.
- Why: Assert the concurrency fact, not its GC-timed output (agent_docs/concurrency.md). The entry is freed once the worker drops its item, so production doesn't leak. Exempt delta: test code only. Re-enqueue stays with the manager.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43595369725
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-14 · douwebot at 5de8d1013c: clean approval · iter -
- Decision: Run 43602126697 (engine claude) approved 5de8d1013c with the bare 'No blocking findings.' body and no inline comments; Gate: clean douwebot approval passes. CI and PR Review Checks green, no open threads, approved:dependencies and approved:ci-config still on.
- Why: Head after the merge-queue removal fix meets the merge bar again; re-enqueue is the manager's.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/43602126697
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
2026-11-14 · merge queue removed #12572 again at 5de8d1013c: unclosed event loop in a Pixeltable teardown · iter -
- Decision: Merge-group CI 43605551946 (enqueued 14:33:59Z, removed 14:51:20Z) failed one job: test on 3.13 (lowest-versions, shard 2/2), 20105 passed plus a teardown error in tests/harness/pixeltable/test_capability.py::TestPixeltableAgent::test_agent_lists_queries_and_retries_outside_the_allowlist (BaseEventLoop.del: ValueError: Invalid file descriptor: -1). No code change; classified as the #12856 mechanism (open; fix #12857), not this PR. Not seen in 14 recent lowest-versions failures of other PRs' queue runs. Unconfirmed: no rerun of that job yet; the re-enqueue is the rerun.
- Why: The test's own run passed and it passed on PR CI, so the loop wasn't its own garbage (tests/AGENTS.md: a background thread that outlives its test creates garbage in the next one). Main moved only by #12769 between the two queue runs; this PR changes no Pixeltable or event-loop code. Re-enqueue stays with the manager.
- Source: https://github.com/pydantic/pydantic-ai/pull/12572#issuecomment-6879695597
- Session: 8fad5ad4-8dc7-4bd2-b40b-cad6dba0702d
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.