Migrate `gh-aw` workflows to the public `pydantic-ai` engine
This pull request was posted by Claude Code using claude-opus-5-5 on behalf of David.
Why we make these changes
Move the repository's 14 primary GitHub Agentic Workflows from the custom Claude-compatible shim runner to the public Pydantic AI engine and the published CLAI 2 runtime 0.64.0, keeping GLM-5.3-Flash through Z.ai and the existing workflow policies. The independent threat detector stays on its pinned Claude CLI 2.1.227 engine.
Locks compile with released gh-aw v1.2.1 and AWF v0.29.7. That is the first release with the status-only reporter fix (github/gh-aw#74939) and an AWF that accepts max-ai-credits: -1. The workflows import the public engine definition at 764a75c329.
New public surface
PAI_RESULT_METADATA=MODULE:ATTRIBUTEon the public engine signs a trusted in-process dictionary into the terminal result metadata.
User-visible behavior
Unchanged from main: model, Z.ai endpoint prefix, proxy-held credentials, permissions, triggers, request and time budgets, the time reserve, one agent run at a time per workflow (one per PR for UI Security), and no shell for Attention Triage, Community Demand and Feature Digest. Under gh-aw 1.2.1:
- Agent jobs keep GitHub's 360-minute limit; the detector gets 20 minutes as job and step (
main: a 20-minute step in an uncapped job); safe outputs keepubuntu-slim's 15. - The agent writes safe outputs through the
safeoutputs_*tools. #12570's CI Review tool policy,E002answering, compaction fallback and root-span totals, and #12768's withholding of a safe output past its limit, run on the engine path;service.versionis the staged shim's digest. - The weekly instructions audit is migrated; its publication job publishes only the proposal the independent review approved. Its agent has an unrestricted shell (
main: Claude's command allowlist), which gh-aw 1.2.1 cannot restrict for this engine. Its Docs App token is scoped to opening that PR. - The 10
gh-proxyworkflows getmain's GitHub CLI proxy back. The CI Review and UI Security completion jobs gainissues: writefor detection issue reporting (github/gh-aw#74949).
Verification
- Engine path:
noopand reserve withholding, over-limit safe output, shell cap at the reserve, root-span totals, compaction fallback, shell exposure per source. - Compiled locks: job limits and UI Security group,
service.versionwiring; weekly audit publication gate; signed result metadata. - Guard, scoped Pyright and Ruff, all 14 compilations, and the gh-aw script and engine test files pass locally.
- Live: Attention Triage run 42316823715 on
f5b47288e9passed agent, detector, safe outputs and completion withmax-ai-credits: -1on AWF v0.29.7; its engine spans carryservice.version39a100b1e71f, that commit's shim digest. - Live on
c46c361fc5: weekly audit run 42382806949 passed every job, including the completion job with the scoped Docs App token. Attention Triage on that head stopped at provider health: open incident #12786, whichmain's scheduled run opened, blocks it. - CI and a clean douwebot approval on
1c5e092fe4.
What changes for existing users
Library users: nothing. Follow-ups: #12796 removes the legacy shim runner after merge; #12797 tracks a supported span path for the public engine. The public engine docs no longer describe a local span file; the launcher still reads PAI_OTEL_EXPORT_PATH, which only this repository's workflows set, because forwarding it needs gh-aw internals.
PR decisions
2026-10-15 · Preserve own policies through PAI_AGENT · iter -
- Decision: Compose Coder with audited workflow policies through the public PAI_AGENT extension.
- Why: Keep public execution and canonical recording while retaining established limits, safe outputs and provider health.
- Source: https://github.com/pydantic/pydantic-ai/blob/29bc2db4d2e109740999d3572c626b8919153ddc/src/pydantic_ai_harness/gh-aw/pydantic.md
2026-10-15 · Keep independent threat detection on supported CLI · iter -
- Decision: Retain built-in Claude 2.1.227 for threat detection and enable native OTLP logs.
- Why: The compatible compiler only supports built-in detector engines; preserving the pinned path avoids changing detection semantics.
- Source: https://github.com/github/gh-aw/blob/v0.91.1/pkg/workflow/threat_detection_inline_engine.go
2026-10-15 · Use verified GLM prices for actual AWF accounting · iter -
- Decision: Apply exact USD-per-token GLM provider rates and corresponding USD-per-million fallback prices; retain existing budget thresholds.
- Why: AWF0.28.31 uses overlays for enforcement; the previous blanket ban confused per-million and per-token units.
- Source: https://docs.z.ai/guides/overview/pricing
2026-10-15 · Enable native detector request spans · iter -
- Decision: Enable the existing pinned Claude detector request-tracing exporter to retain complete token and timing telemetry.
- Why: Live proxy accounting proved the native api_request logs omitted the final text response; native request spans cover that path without a new reporter.
- Source: https://code.claude.com/docs/en/monitoring-usage#traces-beta
2026-10-15 · Report actual detector telemetry after native termination · iter -
- Decision: Use a shared post-step with the pinned compiler OTLP helper and distinct proxy usage counters; preserve native detector and safe-output policy
- Why: Live detector timed out after HTTP502 retries while native telemetry omitted retry/error outcome and one request span; canonical proxy usage remained complete
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/38803678889
2026-10-15 · Preserve existing private Logfire content instrumentation · iter -
- Decision: Keep existing HTTPX capture_all and model/MCP instrumentation in the workflow PAI_AGENT composition
- Why: Baseline cli.configure_observability already opted into the same capture under the same OTLP condition; removing it would change required existing telemetry. Payload-free export applies to the new detector reporter and GitHub evidence publication.
- Source: https://github.com/pydantic/pydantic-ai/blob/3685d7e34426d7efaade8985350b20ea6b4530f5/.github/scripts/pydantic_ai_gh_aw_shim/cli.py
2026-10-15 · Use supported job context in detector reporter env · iter -
- Decision: Pass job.status into the reporter and derive cancellation from its cancelled value
- Why: GitHub rejected cancelled() in step env even though gh-aw compilation accepted it; job context is supported there
- Source: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#context-availability
2026-10-15 · Keep baseline detector telemetry with complete host reporting · iter -
- Decision: Restore native logs-only telemetry settings and use the shared proxy-based post-step for complete request and outcome coverage
- Why: Live enhanced tracing still omitted one request and retry/error outcomes; captured proxy evidence and native retry records provide complete measured counters without extra native tracing flags
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/38803678889
- Supersedes: Enable native detector request spans
2026-10-15 · Run final hosted review through existing branch dispatch · iter -
- Decision: Obtain the final-head CI Review verdict using the migrated workflow dispatch and explicit PR caller context
- Why: The default-main legacy job is behind39olderpendingreviews in the unchanged sharedserialqueue; the existing branch path applies the same eligibility, review and safe-output policy
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/38813315693
2026-10-15 · Preserve review deduplication across compiler footer encodings · iter -
- Decision: Match both legacy HTML and URI-encoded Markdown caller markers on the exact PR head
- Why: Actual v0.91 public review5540755451 emits only the new caller marker, which the existing HTML-only eligibility predicate did not recognize
- Source: https://github.com/pydantic/pydantic-ai/pull/10347#pullrequestreview-5540755451
2026-10-15 · Keep existing CodeQL alert open · iter -
- Decision: Keep the alert open. No dismissal is authorized.
- Why: Maintainer explicitly chose to retain alert 35 and the failing CodeQL check after implementation and permitted validation completed.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
2026-10-16 · Integrate the stale-review noop path · iter -
- Decision: Pin the shared public engine to b4b9ad3de2d7a9cbfd7c70715f1f945496e990ce and regenerate all 13 workflow locks.
- Why: The merged PR Review step writes a pre-agent noop; the prior public-engine pin still started CLAI 2.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347#issuecomment-6219282854
2026-10-22 · Port #10687 telemetry to the CLAI 2 engine path · iter -
- Decision: MarkTimedOutSpans + run budget in wall_clock_caps; httpx headers and response bodies only; slim logfire extra. MarkTimedOutSpans.wrap_run also catches RunTimeLimitExceeded.
- Why: Pickup step 5 on the PR; WorkflowPolicy.on_run_error replaces the budget cancellation with RunTimeLimitExceeded, so a CancelledError-only catch left the root span without error.type (reproduced in test).
- Source: https://github.com/pydantic/pydantic-ai/pull/10347#issuecomment-6304445572
- Supersedes: Preserve existing private Logfire content instrumentation
2026-10-22 · pre-push review 1 of 3 at fccad7e5820c3c101556fa28a3530be2410ce7e2 · iter -
- Decision: reserved; dispatched
- Why: tree 3b8d6eeb0e93f9bc9b7cf19a49011be1602b43ad; scope: conflict resolution in 4b0331ca76 + ceebec7fca + fccad7e582 (clean merges dd5a0dee90, da1a3833ca), against last-reviewed 3f4e3e76; policy base 767f5267778e. An earlier informal opus review of the 4b0331ca76 resolution ran outside this gate's context contract and is not counted.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
2026-10-22 · pre-push review 1 of 3 at fccad7e5820c3c101556fa28a3530be2410ce7e2 · iter -
- Decision: remediated: RetryPromptPart is_error test restored on the pinned path; time-reserve test no longer leaks run_deadline; MarkTimedOutSpans docstring names agent.WorkflowPolicy; PR body drops stale 0.56.0 and daily 5000.
- Why: reviewed tree 3b8d6eeb0e93; remediation delta is test code and one docstring only, exempt (missing coverage of established behavior from 3f4e3e76 + test-harness repair + comment-only); exemption chains from fccad7e582.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
2026-10-22 · pushed 872146431068 on exempt delta from fccad7e582 · iter -
- Decision: pushed without a second review
- Why: delta from reviewed fccad7e582 is test code and one docstring (remediation of review 1); 2 of 3 review dispatches remain
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
2026-11-01 · Preserve review-failure publication on the protected compiler · iter -
- Decision: Keep failure-label publication after detection errors; pursue an upstream compiler correction rather than accept the changed gate.
- Why: Released gh-aw 1.0.1 status-only jobs reject trusted pre-agent eligibility outputs. David selected preserving behavior; UI Security works with event-bound metadata.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · Use compatible policy dependency ranges · iter -
- Decision: Use published runtime 0.64.0 with the safe engine import; allow fastmcp 3 and MCP 1 updates instead of exact policy dependency pins.
- Why: Actual isolated runtime resolution selected fastmcp 4.1.4/MCP 2.3.0, whose renamed MCPError breaks the existing policy import; compatible ranges select 3.4.11/1.30.0 and preserve the tested API.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · Separate the compiler fix from released runtime acceptance · iter -
- Decision: Compile with stable gh-aw 1.0.1 plus immutable fix 4bffded947f776546cc1a8410aaeca917b20708f; explicitly retain released v1.0.1 Actions helpers and AWF0.29.0.
- Why: The complete patch applies to the stable baseline, focused graph/compiler/linter tests and all13 real workflow compilations pass, and all155 mirrored runtime helper files match the accepted manifest. The changed code is authoring-time validation only, so a new runtime release is unnecessary.
- Source: https://github.com/github/gh-aw/issues/73835
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · pre-push review 2 of 3 at 163d3fedf13f4818b63b9847ddaf7347b17ad661 · iter -
- Decision: Reserved; fresh reviewer-deep dispatch pending.
- Why: Candidate tree768a394ceb3f32c25bb375301eef0ff0691a692b; widened to full branch against policy/merge base133a75127f7b938567b8af7da1d59b95fe5a92fd for current main integration and protected engine/compiler upgrade; prior reviewed anchorfccad7e5820c3c101556fa28a3530be2410ce7e2/tree3b8d6eeb0e93f9bc9b7cf19a49011be1602b43ad.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · pre-push review 2 of 3 at 163d3fedf13f4818b63b9847ddaf7347b17ad661 · iter -
- Decision: Three required findings: authenticated noop terminal, typed health metadata through protected postprocessing, and credential-free Python telemetry export; reproduction and remediation underway.
- Why: Fresh latest-Sol reviewer-deep reviewed tree768a394ceb3f32c25bb375301eef0ff0691a692b against stable main133a75127f; one review dispatch remains. Current candidate is not approved for publication.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · Preserve policy metadata and private tracing through protected capture · iter -
- Decision: Sign opt-in in-process terminal metadata; export Python spans with the official OTLP file exporter and forward from the credentialed host without an artifact mirror. The noop emits a signed terminal without inference.
- Why: Review2 reproductions proved protected postprocessing discards legacy health stdout and OTLP credential exclusions disable in-process tracing. New boundary tests pass; keep the exclusions and published runtime0.64.0. Pin the corrected inline definition to an immutable commit contained in this branch.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · pre-push review 3 of 3 at d991688986e234c35ee943fa9a70ccd49ae44e59 · iter -
- Decision: Reserved; dispatch fresh reviewer-deep on latest Sol from stable policy checkout.
- Why: Tree805183d9b6be93b91d5977e815b12311ab8b263d; scope163d3fedf13f4818b63b9847ddaf7347b17ad661..d991688986e234c35ee943fa9a70ccd49ae44e59 plus affected invariants, full branch context; main remains133a75127f7b938567b8af7da1d59b95fe5a92fd. All targeted and actual published-runtime checks pass. This consumes the final review dispatch.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · pre-push review 3 of 3 at d991688986e234c35ee943fa9a70ccd49ae44e59 · iter -
- Decision: Two required findings reproduced: missing host-installed file exporter and infrastructure transport truncation. Remediate both, verify targeted behavior, then push under the exhausted-budget rule; no fourth pre-push dispatch.
- Why: Host-only installer repro failed as expected; actual released sender truncated a4014-character JSON attribute to1024. Install file exporter with host observability; forward private OTLP values unchanged with host credentials and no artifact mirror. Packaged guidance alignment after the reviewed tree is included in final verification.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · Publish 3985eb59 after final review remediation · iter -
- Decision: Push3985eb59c18e48981ed083a9a26147d2392fe21b under the exhausted three-review budget after fixing and testing all findings. Never request a fourth pre-push review.
- Why: Tree040ecc86a2e78b0c94633994ac8dc30fd365a58d is clean; installer, long private JSON transport, malformed-input privacy, published-runtime boundary tests, Node checks, types, guard, hooks and no-drift compilation pass. Public definition1b7b49074bf7c4b2ac3bbcdfc4068dec649f7a6c retains released0.64.0/1.0.1/AWF0.29.0. Native/live/hosted gates remain for exact pushed head.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-01 · Pass native fixture host source explicitly · iter -
- Decision: Resolve the shared workflow source from the trusted repository and pass its absolute path only to host postprocessing.
- Why: Exact-head native41340238795 ran its agent successfully but postprocess failed ENOENT after the fixture was copied into a temporary workspace. The original relative path pointed outside the copied layout; source selection, Node syntax and targeted types now pass. Final review budget remains exhausted.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/41340238795
- Session: 01a140c2-f756-78e2-8f42-09cc598012b2
2026-11-03 · Fresh pre-push review budget for Claude takeover · iter -
- Decision: This takeover is a new task, so it gets a fresh pre-push review budget of 3; count dispatches from 1 again.
- Why: David's ruling relayed by the manager in the phase-2 dispatch; the Codex task's 3 of 3 stay spent for that task.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 6692dfa8-3414-4112-b560-c58d07910852
2026-11-04 · Split the weekly CE audit publication gate · iter -
- Decision: Option B: the agent post-step validates coverage, edit boundary and Task review against the reviewed .ce-audit/review/proposal.json; a safe-outputs step checks the ingested create_pull_request item equals that reviewed proposal and rejects noop plus PR. Decided by the manager; David can override.
- Why: gh-aw 1.0.1 rejects post-steps that read safe-output files; only the split keeps the guarantee that the published proposal is exactly the one the independent review approved.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 6692dfa8-3414-4112-b560-c58d07910852
2026-11-04 · Restore no-shell for community-demand and feature-digest · iter -
- Decision: Fix in this PR: restore no shell where the source declares bash: [], and pin every workflow's shell exposure against its source frontmatter in a test. Counts as the first regression; the second-regression stop rule still applies. Decided by the manager; David can override.
- Why: Base compiled both without Bash; the migrated composition gave every non-Attention workflow a shell, widening tool permissions.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 6692dfa8-3414-4112-b560-c58d07910852
2026-11-04 · pre-push review 1 of 3 at 2f0ef75ebe70ceb6b3f6f45c10fd688d1266fb47 · iter -
- Decision: Reserved; fresh strong-tier reviewer dispatched from a policy-base checkout
- Why: tree 10d6853de624d1b22da48769888fc985e00e35d7; scope full branch 67f4fb1a657d5db89c34f4d2a7ded8981ba01c15...2f0ef75ebe70ceb6b3f6f45c10fd688d1266fb47 (first review of this task; includes main merges, weekly-ce-audit migration and split publication gate, shell restriction, native-capture collector fix); policy base 67f4fb1a657d5db89c34f4d2a7ded8981ba01c15
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 6692dfa8-3414-4112-b560-c58d07910852
2026-11-04 · pre-push review 1 of 3 at 2f0ef75ebe70ceb6b3f6f45c10fd688d1266fb47 · iter -
- Decision: 7 findings; fixing stopped under the second-regression rule. Verified regressions vs main: stale-issues-finder agent job now capped at 60 min with a 60-min step budget (gh-aw 1.0.1 DefaultAgentJobTimeout); threat detector cut from 20 to 10 min (DefaultDetectionJobTimeout); UI Security agent serialized across PRs by the shared engine.concurrency group. Also valid: tool-hints routes safe outputs via shell; stale legacy script headers; stale PR body. Design question: public PAI_OTEL_EXPORT_PATH needs a user-written forwarder.
- Why: tree 10d6853de624d1b22da48769888fc985e00e35d7; scope full branch 67f4fb1a65...2f0ef75ebe70ceb6b3f6f45c10fd688d1266fb47; findings checked against base 133a75127f and head locks plus gh-aw pkg/workflow/job_timeouts.go
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 6692dfa8-3414-4112-b560-c58d07910852
2026-11-06 · Merge main d3172e9f6b with #12570 into local 2f0ef75ebe · iter -
- Decision: One merge of upstream/main (includes #12570 afa00e5bb3). Kept #12570's fixes; shim conflicts resolved onto the build_agent() composition; locks taken from ours and all 14 recompiled with v1.0.1+status-only.4bffded94; not pushed.
- Why: Manager dispatch 20261105T162649Z: main merge only, sequenced after #12570; the three open regressions and other review-1 findings stay untouched pending David's ruling.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Carry SAFE_OUTPUT_TOOL_PREFIXES through _safe_output_type · iter -
- Decision: safe_output_type strips either prefix ('mcp__safeoutputs_', 'safeoutputs_'); hold_time_reserve_for_safe_output, E002 answering and CI Review withholding all match through it.
- Why: #12570 matches safe-output tools only through safe_output_type; the CLAI 2 engine names them safeoutputs.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · CIReviewToolPolicy joins build_agent() with the Coder shell · iter -
- Decision: Renamed public (agent.py imports it, as MarkTimedOutSpans); added to build_agent(). The reserve cap applies to Coder's 'shell' tool with default MAX_FOREGROUND_WAIT; noop stays withheld, so the CI Review prompt's 'noop is not available' sentence stays. The legacy run() keeps the policy but no longer caps its 'Bash'.
- Why: #12570 body: change its Bash name to the Coder shell tool's name. Production runs only the CLAI 2 path; Coder's shell rejects a timeout above 270 s and returns a still-running foreground command to the model.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · RecoverMCPToolErrors carries the E002 wrapper toolset · iter -
- Decision: #12570's get_wrapper_toolset (_AnswerSafeOutputLimit) lands on the already-composed RecoverMCPToolErrors; covered on the CLAI 2 path by test_safe_output_past_its_limit_does_not_spend_the_tool_retry.
- Why: Capability wrapper toolsets wrap run-time toolsets too (Agent._get_toolset), so the engine's MCP tools pass through it.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · compact_history fallback keeps the head only when it is a request · iter -
- Decision: head = middle[:1] if isinstance(middle[0], ModelRequest) else []. Non-preserve path unchanged from #12570; preserve_prompt path keeps [task, *tail] or [task, synthetic, *tail]. Summariser usage merges in finally; name history-summariser and the compact history span from #12570.
- Why: Reproduced: #12570's unguarded head under preserve_prompt puts the response after the task directly before the tail's first response (test_compaction_fallback_resumes_at_the_tail_after_the_task fails with it). finally keeps the branch's cancellation usage fix.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · RecordRunTotals joins build_agent(); service_version not ported · iter -
- Decision: RecordRunTotals added to build_agent() (root span totals include the Task delegate, tested). service_version stays in cli.configure_observability, which the CLAI 2 path does not call; open question for the manager.
- Why: The engine launcher calls logfire.configure before importing PAI_AGENT, and a second configure replaces its private exporter (gh-aw/README.md); setting it needs engine env plumbing, outside a merge-only phase.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · prefetch-open-issues.sh keeps the workspace corpus path · iter -
- Decision: Kept out_root=$GITHUB_WORKSPACE/.github/.issue-context over main's GH_AW_AGENT_DIR override; #12570's two prefetch-open-issues tests now set GITHUB_WORKSPACE.
- Why: The stale-issues prompt and shim instructions read the corpus from the checkout; no lock on main or this branch sets GH_AW_AGENT_DIR, so it served only test isolation.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Stale-PR skip step: main's order plus the branch's mkdir · iter -
- Decision: Took #12570's step position before the PR checkout (id stale-pr, skipped output) and kept the branch's mkdir -p of the safe-outputs directory.
- Why: #12570 item 4; 24b48e203a creates the directory the CLAI 2 engine has not made yet when the step writes its noop.
- Source: https://github.com/pydantic/pydantic-ai/pull/12570
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · service_version reaches the CLAI 2 engine through engine.env · iter -
- Decision: David chose option (a), engine.env. stage-gh-aw-agent.sh outputs cli.source_digest() of the staged copy (step id workflow-policy); shared/engine-zai.md sets LOGFIRE_SERVICE_VERSION: ${{ steps.workflow-policy.outputs.service-version }}. Not hashFiles().
- Why: Staging runs before 'Check out the PR head', so hashFiles() at the engine step would hash the PR head instead of the code that runs. The pinned launcher calls logfire.configure without service_version, so the env var applies; gh-aw compiled the steps.* expression into all 14 agent jobs.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
- Supersedes: RecordRunTotals joins build_agent(); service_version not ported
2026-11-06 · Fold the gateway MCP test's in-loop import fix · iter -
- Decision: David chose fold. test_imported_tools_and_gateway_mcp_tools_both_execute imports the generated wrapper with asyncio.to_thread; the other five async callers are unchanged.
- Why: Reproduced alone on main (base 8404728a6d) and here: the wrapper's first pydantic_ai.mcp import scans package files inside the running loop and blockbuster raises. The launcher imports the wrapper at process start; only this caller passes an MCP config, and the five others pass alone.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Proceed in #10347 after the second-regression stop · iter -
- Decision: David chose fix here: apply his rulings in this PR, recompile, pre-push review 2 of 3, then push, CI, live workflow checks and douwebot.
- Why: The remaining regressions are lock configuration; a follow-up would ship them to main, a clean slate repeats all review.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Restore main's job timeouts · iter -
- Decision: David chose restore main: agent job uncapped (GitHub default 360), detection 20, safe_outputs 45 min, via gh-aw job overrides.
- Why: gh-aw 1.0.1 defaults cap agent 60 (stale-issues-finder's 60-min engine step no longer fits), detection 10 and safe_outputs 15 (13 workflows); main had none, 20 and 45.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · UI Security agent runs keyed per PR · iter -
- Decision: David chose the per-PR group: the shared engine.concurrency group appends the PR number for Pydantic AI UI Security Review only; the other 13 stay one run per workflow.
- Why: Main ran UI Security in parallel across PRs; 148 agent runs Nov 3-6 (113 on Nov 4) would back up for hours serially. Enqueue-time gating rejected for now: required check, 60-min queue timeout, dequeue on provider errors, trigger change out of scope.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Drop PAI_OTEL_EXPORT_PATH from the public engine docs · iter -
- Decision: David chose remove from docs; the setting keeps working for this repository's workflows.
- Why: Using it needs a user-copied host forwarder that calls undocumented gh-aw internals.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Apply the tool-hints and legacy header fixes · iter -
- Decision: David chose apply both: shared/tool-hints.md routes safe outputs to the offered safeoutputs_* tools; legacy launcher and prewarm headers describe their current role. Script deletion stays post-merge.
- Why: Three workflows have no shell and every workflow loses it inside the time reserve.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · pre-push review 2 of 3 at 1d1c7a8d287ea3b79cd4cfed52ede2ac75476549 · iter -
- Decision: Reserved; fresh strong-tier (Opus) reviewer dispatched from a policy-base checkout with read/search tools only
- Why: tree 459e950dc3a26cd8aad4caa80618b77285fb2181; follow-up scope since reviewed 2f0ef75ebe (tree 10d6853de6): remerge-diff of merge c40bdf80ce (main d3172e9f6b incl. #12570), c40bdf80ce..1bab76268c, clean merge 1d1c7a8d28 of main 5195f70703; full branch diff as context; policy base 5195f707033081a13a6ca09903fc2fb023007808
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Reopen #10347 and continue · iter -
- Decision: David chose reopen and continue after #10347 was closed at 2026-11-05T23:41Z without a comment; push the reviewed head, then reopen, then run the post-push loop.
- Why: No successor PR; the branch still exists at 027c10b273. Pushing before reopening runs CI once, on the new head.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · safe_outputs keeps its 15-minute ubuntu-slim limit · iter -
- Decision: No safe_outputs timeout override: main's 45 on ubuntu-slim was inert, so 15 is main's effective limit; 45 would move the job to ubuntu-latest.
- Why: GitHub caps ubuntu-slim jobs at 15 minutes and fails longer ones; gh-aw 1.0.1 switches a longer explicit timeout to ubuntu-latest (pkg/workflow/runner_timeouts.go). Implements David's restore-main ruling; my option text had listed 45.
- Source: https://github.blog/changelog/2026-01-22-1-vcpu-linux-runner-now-generally-available-in-github-actions/
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
- Supersedes: Restore main's job timeouts
2026-11-06 · Detection job and step stay at 20 minutes · iter -
- Decision: David chose keep 20: jobs.detection.timeout-minutes 20 sets job, step and AWF agentTimeout alike; a detector that uses its full budget now ends as a cancelled job rather than a timed-out step.
- Why: gh-aw 1.0.1 derives the detection step from the job (pkg/workflow/agentic_engine.go resolveStepTimeoutValue); 31 sampled detector jobs took 0.3-2.5 min. Main ran a 20-minute step inside an uncapped job.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · pre-push review 2 of 3 at 1d1c7a8d287ea3b79cd4cfed52ede2ac75476549 · iter -
- Decision: 5 findings. Fixed: observability docs overstated (direct export only); test name and docstring said the previous compiler capped detection. Decided by David: detector cap stays 20 (job = step). Recorded: safe_outputs 15 is main's effective ubuntu-slim limit. Process items: reopen #10347 around the push; refresh the PR body after push.
- Why: reviewed tree 459e950dc3a26cd8aad4caa80618b77285fb2181; review-1 findings verified fixed (agent 360, per-PR UI Security, tool-hints, script headers); no problems in the merge resolutions, service.version wiring or off-loop import
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · pre-push review 3 of 3 at cc7cf5478cc5952b7239397431288d0dfaaa9eaa · iter -
- Decision: Reserved; fresh strong-tier (Opus) reviewer from a policy-base checkout, read/search tools only; final dispatch
- Why: tree 8646b9167496b0ce1f3b2a8d2a0d68cbcfe72ca1; follow-up scope 1d1c7a8d28..cc7cf5478c (review-2 remediation: docs wording, test rename); policy base 61db3e988851c8905bc16c8f518a1052deccec5d
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · pre-push review 3 of 3 at cc7cf5478cc5952b7239397431288d0dfaaa9eaa · iter -
- Decision: no findings: current at cc7cf5478cc5952b7239397431288d0dfaaa9eaa; review budget exhausted
- Why: reviewed tree 8646b9167496b0ce1f3b2a8d2a0d68cbcfe72ca1; scope 1d1c7a8d28..cc7cf5478c (review-2 remediation); policy base 61db3e988851c8905bc16c8f518a1052deccec5d
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · JSON span exporter moves from dev to the gh-aw-tracing group · iter -
- Decision: Merged main c833840a95 once (pyproject union, uv.lock relocked); the exporter moved to a gh-aw-tracing dependency group that the CI harness cell syncs with its own --only-group step; test_tracing_exports_locally_without_sandbox_credentials skips without it. Pushed b763d20f67 under the exhausted review budget, no fourth review.
- Why: CI coverage on cc7cf5478c missed pydantic_evals/otel/_context_subtree.py 19-26: the exporter brings opentelemetry-sdk into dev, so the pydantic-evals cell lost its no-SDK fallback run. A sync naming two --package flags ignores root groups, hence the separate step.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/42154099047
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Live Attention run fails before the agent: max-ai-credits -1 on AWF 0.29.0 · iter -
- Decision: Open, for David: every compiled lock emits apiProxy.maxAiCredits -1 from shared/engine-zai.md, which AWF 0.29.0 rejects; no fix applied.
- Why: Run 42154259618 agent job: 'config.apiProxy.maxAiCredits must be > 0'. gh-aw issue 72523 is open; AWF accepts -1 from v0.29.1 (gh-aw-firewall PR 10828); gh-aw v1.2.0 defaults to AWF v0.29.6. An import's sandbox.agent.version is ignored (only mounts merge); a per-workflow override drops the firewall image digest pins.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/42154259618
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Native capture fixture compile failed once with CTR-002, passed on rerun · iter -
- Decision: Reran once (attempt 2 passed at 61ed878206); not fixed. If it recurs, reproduce with the released linux gh-aw v1.0.1 binary the script downloads, then fix in this PR (the workflow is this PR's).
- Why: Attempt 1 of run 42221667171: the fixture's setup-action references stayed tag refs (CTR-002 x5) though 61ed878206 changed only a test file and b763d20f67 passed. A local dev-build compile cannot reproduce release-mode pinning.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/42221667171
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-06 · Wait for the next gh-aw release to clear max-ai-credits -1 · iter -
- Decision: David chose wait, pre-release OK: hold #10347 until gh-aw cuts any release after 2026-11-05 (pre-release counts), then recompile all 14 locks with that released binary, drop the patched compiler, and rerun the live checks. No compiler patch for -1.
- Why: gh-aw main merged the status-only compiler fix (gh-aw PR 74939, 2026-11-05) and pins AWF v0.29.7; AWF accepts maxAiCredits -1 in config from v0.29.1 (gh-aw-firewall PR 10828). v1.2.0 (2026-11-04) predates 74939. gh-aw issue 75271 needs no wait: AWF v0.29.0 already contains gh-aw-firewall PR 9359.
- Source: https://github.com/github/gh-aw/issues/72523
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
- Supersedes: Live Attention run fails before the agent: max-ai-credits -1 on AWF 0.29.0
2026-11-06 · gh-aw v1.2.1 rejects bash restrictions for the pydantic-ai engine · iter -
- Decision: Open, for David: v1.2.1 compiles 10 of 14; it errors on bash: [] (attention-triage, community-demand, feature-digest) and on weekly-ce-audit's bash allowlist. Working tree reverted; nothing committed.
- Why: agent_validation.go validateBashCommandAllowlistSupport: the public engine declares neither bash-disable nor bash-command-allowlist. The shim withholds the shell by workflow name (NO_SHELL_WORKFLOWS), so the three no-shell sources keep their restriction; weekly-ce-audit's allowlist is unenforced on this branch (Coder shell is unrestricted), while main enforces it through Claude --allowed-tools. v1.2.1 also restores main's CLI proxy on the 10 gh-proxy workflows and adds issues: write to the two review conclusion jobs (gh-aw PR 74949).
- Source: https://github.com/github/gh-aw/blob/v1.2.1/pkg/workflow/agent_validation.go
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · weekly-ce-audit declares a full shell; no-shell sources drop bash: [] · iter -
- Decision: David chose full shell: weekly-ce-audit sets bash: ['*'], declaring the unrestricted Coder shell it already has on this branch. The three no-shell sources drop bash: [] (gh-aw v1.2.1 rejects it for this engine); the shim's NO_SHELL_WORKFLOWS stays the enforcement and the test pins its names to real workflows.
- Why: Main enforces weekly-ce-audit's allowlist via Claude --allowed-tools; this branch never did. The container holds no credentials, host validation rejects edits outside canonical CE Markdown, and publication requires the reviewed proposal.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
- Supersedes: gh-aw v1.2.1 rejects bash restrictions for the pydantic-ai engine
2026-11-07 · Compile all 14 workflows with released gh-aw v1.2.1 · iter -
- Decision: Released v1.2.1 binary (checksum-verified), --action-mode action --action-tag v1.2.1; drops the patched v1.0.1+status-only build. AWF v0.29.7 with digest pins; maxAiCredits -1 goes through the AWF config file. Deleted the inert sandbox.agent.token-steering block (locks differ only in frontmatter hash). Native capture keeps its released v1.0.1 fixture compile: it accepts the public engine's documented minimum.
- Why: v1.2.1 contains gh-aw PR 74939; AWF v0.29.7 contains gh-aw-firewall PR 10828 (config -1). Compiler-driven lock changes: CLI proxy on the 10 gh-proxy workflows (as on main), issues: write on the CI Review and UI Security conclusion jobs for detection issue reporting (gh-aw PR 74949).
- Source: https://github.com/github/gh-aw/releases/tag/v1.2.1
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
- Supersedes: Separate the compiler fix from released runtime acceptance
2026-11-07 · pushed f5b47288e9 on the exhausted review budget · iter -
- Decision: Pushed without a fourth pre-push review.
- Why: Review 3 of 3 cleared cc7cf5478c. Delta: released-compiler recompile, the -1 fix, and David's decisions (wait for the release; weekly-ce-audit full shell). Targeted checks pass: workflow guard, gh-aw script tests (1 skip), pyright and pre-commit.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · Merge main bbd5327dcf with #12674 onto the engine path · iter -
- Decision: Merged main once. #12674's 10-minute 429 window and reserve-aware stop apply unchanged: the engine path builds its model with cli.build_model (rate_limit_retry_transport) and agent.py sets cli.run_deadline. The runner-src checkout stays in the legacy launcher and prewarm, which no workflow runs; pre-agent-steps and stale-issues-finder keep the CLAI 2 staging. source_digest() keeps its docstring. UI Security drops manual-approval as on main. Locks taken from ours and recompiled with v1.2.1.
- Why: #12674 item 3 (shim and library from one commit) does not arise on the engine path: the engine installs published runtime 0.64.0, not the workspace's pydantic_ai_slim.
- Source: https://github.com/pydantic/pydantic-ai/pull/12674
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · pushed dc98b4912a (main merge) on the exhausted review budget · iter -
- Decision: Pushed the merge without a fourth pre-push review. Main's new 429 reserve test patches the public run_deadline (the branch renamed _run_deadline because agent.py sets it).
- Why: Delta: the #12674 port described in the merge entry plus that one test rename. Workflow guard, pyright and gh-aw script tests pass (1 skip).
- Source: https://github.com/pydantic/pydantic-ai/pull/12674
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · Scope the Docs App to weekly-ce-audit's create-pull-request · iter -
- Decision: Moved safe-outputs.github-app under create-pull-request. The safe_outputs job mints the Docs App token only for PR creation (contents and pull-requests write, as before); the completion job uses GITHUB_TOKEN.
- Why: Run 42317874879: gh-aw 1.2.1's completion job always requests actions: read (job-duration collection, notify_comment.go computeConclusionJobPermissions) plus issues: write, and the Docs App installation grants neither; minting failed and failed the run after a successful noop. Its partial coverage (request budget exhausted) matches main's 2026-11-03 run 41637422553, so it predates this PR.
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/42317874879
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · defer: legacy gh-aw shim runner removal · iter -
- Decision: Filed as #12796 (immediate work, assigned dsfaccini, pydanty:skip)
- Why: Out of scope for this PR: removing the runner needs its own pass over the cli.py helpers agent.py still imports; David chose file and assign
- Source: https://github.com/pydantic/pydantic-ai/issues/12796
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · defer: gh-aw engine span export · iter -
- Decision: Filed as #12797 (immediate work, assigned dsfaccini, pydanty:skip)
- Why: Out of scope for this PR: a supported public span path is its own design decision and may need a gh-aw mechanism; David chose file and assign
- Source: https://github.com/pydantic/pydantic-ai/issues/12797
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · pydanty review triage · iter -
- Decision: Fixed: one cli.provider_health() for emit_result and WorkflowPolicy.wrap_run; compaction comment says the fallback drops the kept prompt's response. Skipped with evidence: staging imports the shim via PYTHONPATH (live runs pass); restore-history step absent on main too; preserve_prompt recursion intentional; rglob('*') walks the same tree, session record preferred because it is signed; httpx gate equals the launcher's exporter gate, clai2 plugin httpx defaults False; #12813's defect already fixed off-loop here; pin and legacy launcher (#12796) deliberate.
- Why: Classified each finding on net value after reading the code at c46c361fc5.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347#issuecomment-6711502254
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · Wait for #12768, then merge main and port it · iter -
- Decision: David chose: he merges #12768 now; hold the local fixes, merge main once it lands, port its before_model_request onto RecoverMCPToolErrors, push once.
- Why: One CI run and one douwebot re-review instead of two; keeps the earlier ruling that #12768 lands first.
- Source: https://github.com/pydantic/pydantic-ai/pull/12768
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-07 · #10347 merges before #12790 · iter -
- Decision: David chose #10347 first; #12790 then rebases, keeps its host provider-health record and drops the shim Bash scoping.
- Why: After #10347 no workflow runs the legacy shim, weekly-ce-audit has a full shell by David's ruling, and gh-aw v1.2.1 rejects command lists for this engine, so the scoping has nothing to scope.
- Source: https://github.com/pydantic/pydantic-ai/pull/12790
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-08 · Merge main 043d7974e6 with #12768 onto RecoverMCPToolErrors · iter -
- Decision: Merged main once. #12768's past_limit and before_model_request land on the renamed RecoverMCPToolErrors (for_run returns RecoverMCPToolErrors()). Its legacy test patches run_deadline; main's test_ci_review_bash_stops_when_the_time_reserve_starts stays deleted, as on this branch. The engine-path E002 test now also asserts noop is no longer offered.
- Why: David merged #12768 first so this branch picks it up from main; CIReviewToolPolicy already caps the Coder shell, covered in test_workflow_agent.py.
- Source: https://github.com/pydantic/pydantic-ai/pull/12768
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
2026-11-08 · pushed 1c5e092fe4 on the exhausted review budget · iter -
- Decision: Pushed without a fourth pre-push review.
- Why: Delta since c46c361fc5: pydanty triage fixes (one provider_health(), compaction comment), the main merge with #12768 ported onto RecoverMCPToolErrors, and its engine-path assertion. Ruff, scoped Pyright, test_workflow_agent.py and test_pydantic_ai_runner.py pass.
- Source: https://github.com/pydantic/pydantic-ai/pull/10347
- Session: 4856ffbc-4e48-491c-995b-0b6f2b036e0a
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.