Skip to content

feat(fix): make the Agent SDK the Anthropic default - #93

Merged
lucasbraum merged 4 commits into
mainfrom
lucasbraum/upt-23-make-the-agent-sdk-executor-the-default-for-anthropic
Oct 13, 2026
Merged

lucasbraum merged 4 commits into
mainfrom
lucasbraum/upt-23-make-the-agent-sdk-executor-the-default-for-anthropic

Conversation

@lucasbraum

@lucasbraum lucasbraum commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Implements UPT-23.

Authenticated Anthropic CLI fixes now use the Agent SDK by default when it is installed; without it they fall back to the patch executor with a one-line hint in the fix output. --agent patch opts out; OpenAI, Gemini and callers supplying a fixer retain the patch executor. --no-llm still disables assistance.

One session handles the package's remaining manual sites with shared rule knowledge. It reuses the post-install TypeScript program, scopes and caches session tests, and runs the full selected suite once at final verification. Confirmed compiler findings already resolved by mechanical edits are skipped by both executors. Undeclared scratch additions are removed before revalidating the remaining edits; path checks reject symlink escapes.

Stripe's shared period helper and both executors' guidance accept legacy subscription-level and modern item-level webhook fields. Endpoint API versions determine the payload shape.

The SDK stays an optional peer, external to both bundles: as a dependency it would add about 270 MB to every npx uptide, --no-llm and other providers included. The Uptide Action installs it. ADR 0016 records the size decision, our reading of the published terms, and three questions for Anthropic that remain open. Privacy docs and CLI disclosure describe repository reads, check output and the SDK traffic/settings/persistence switches.

Benchmark

Three trials × three public repositories × two executors: all 18 sequential runs completed
with Sonnet 5.5, medium effort and a $1 per-package budget. SDK trials omit --agent, testing
the new default; controls explicitly select patch. Times, costs and counts are medians
(ranges); cost per agent fix is total spend / total agent-fixed sites across the three runs.
Final lockfiles match across all trials for each repository.

Repository / upgrade Executor Time, median (range) USD, median (range) USD / agent fix Fixed: mechanical + agent; manual Types before → after Verified
boxyhq / Stripe patch 2m58s (2m41s–3m18s) $0.031 ($0.031–$0.072) $0.011 2 + 4; 1 4 → 0 3/3
boxyhq / Stripe sdk 2m29s (2m27s–2m58s) $0.188 ($0.186–$0.191) $0.044 2 + 4 (4–5); 1 (0–1) 4 → 0 3/3
alanagoyal / React patch 4m56s (4m06s–5m00s) $0.103 ($0.100–$0.105) $0.010 1 + 10; 2 13 → 2 0/3
alanagoyal / React sdk 1m47s (1m45s–1m48s) $0.077 ($0.076–$0.079) $0.006 1 + 12; 0 13 → 0 3/3
PATH / zod patch 7m36s (7m09s–7m37s) $0.122 ($0.119–$0.144) $0.035 17 + 4 (3–4); 2 (2–3) 27 → 6 (6–7) 0/3
PATH / zod sdk 6m59s (6m43s–8m30s) $0.221 ($0.217–$0.239) $0.038 17 + 6; 0 27 → 2 0/3

Method, exact revisions, individual trials and excluded development runs.

  • PATH meets the speed target on median, with all 23 planned fixes retained in every SDK run; one run still takes 8m30s. A new engine diagnostic and failing designer tests keep all PATH results unverified.
  • React verifies 3/3 with SDK versus 0/3 with patch, which leaves two ref-type errors in every trial.
  • Stripe verifies 3/3 with both executors. Shared knowledge improves patch too; patch is substantially cheaper here. The previous one-third-cost-per-fixed-site claim does not hold in this rerun.
  • Seven PATH sites are now correctly counted as mechanically resolved for both executors. Compare total fixes and remaining diagnostics, not agent-only totals, with PR feat(fix): experimental --agent sdk executor on the Claude Agent SDK #89.
  • Synthetic checks of all six generated Stripe migrations confirmed that both handlers accept legacy and item-based payloads. Two SDK and all three patch trials retain the standalone sync script's API pin as a manual decision.

The measured executor sources are in cf5682b; the later merge of main adds 0.8.0 metadata
and uptide.yml support without changing the measured executor, pack or verifier. Fixture
roots have no uptide.yml. Explicit configured executors are covered by additional tests.
SDK uses full baseline/final suites and scoped session checks; patch retains its existing
test selection/retry behavior. The test scopes are not identical.

How it was verified

  • Implementation CI passed lint, build, typecheck, full tests and clean-container npm/pnpm/Yarn smoke tests on Node 20 and 22.
  • Node 20: 1,724 tests passed, 34 skipped. Node 22: 1,726 passed, 32 skipped, plus 18 passing package-manager/bot-loop network tests.
  • Every migration pack passed.
  • Clean npm installation of the packed CLI automatically installed and resolved the SDK.
  • A real recursive pnpm check confirmed --no-bail runs later workspaces while preserving failure status.
  • Final documentation links and git diff --check passed locally. The last commit changes documentation and a build-config comment only.

Limits and tradeoffs

One session is accepted or reverted atomically. Users who want the SDK executor install the
optional peer (roughly 270 MB unpacked, with native/peer packages) next to Uptide.
ADR 0016's license finding is our reading of the published conditions, not confirmation
from Anthropic; its three questions for Anthropic are open. Live Stripe events and service-dependent application integration tests were
not run for this benchmark. PATH is not ready to publish, and the under-eight-minute result
is a median rather than a per-run guarantee.

Checklist

  • Tests for the change
  • pnpm lint, pnpm typecheck and pnpm test pass in implementation CI
  • README, privacy, config and executor docs updated
  • New changeset for the default after the 0.8.0 release
  • Dependency decision requested by UPT-23 and recorded in ADR 0016
  • No private source or local paths added to fixtures, tests or docs
  • CONTRIBUTING.md invariants retained

@lucasbraum

Copy link
Copy Markdown
Collaborator Author

A note from the follow-ups to #89, so it isn't lost: if this PR ever switches the Agent SDK back from a pinned normal dependency to an optional peer, uptide fix needs a one-line hint suggesting the install when --agent sdk would be the default and the SDK can't be imported, falling back to the patch agent. As a normal dependency it is always installed, so no hint is needed. Nothing to do here otherwise.

lucasbraum and others added 4 commits October 12, 2026 19:56
The rebase onto main dropped the merge commit that carried them: uptide.yml's
executor (auto, patch, sdk) reaches fix as configured, and the schema, rendered
uptide.yml and docs describe auto as the SDK for Anthropic.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
…n installed

The SDK brings about 270 MB, which every npx uptide would download, --no-llm,
OpenAI, Gemini and uptide/onboarding consumers included. It stays an optional
peer: the default uses it when it can be imported, and otherwise runs the patch
executor with a one-line hint in fix output. An explicit --agent sdk is unchanged.

- Declared new files are compared as git names them, so ./a.ts is not removed.
- The assisted-fix note names the SDK only when it can run (Anthropic, not --agent patch).
- ADR 0016 keeps the three questions for Anthropic open; privacy names
  CLAUDE_AGENT_SDK_CLIENT_APP; the changeset says one session per package.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
@lucasbraum
lucasbraum force-pushed the lucasbraum/upt-23-make-the-agent-sdk-executor-the-default-for-anthropic branch from c8da53e to 97cf2a2 Compare October 13, 2026 03:04
@lucasbraum
lucasbraum marked this pull request as ready for review October 13, 2026 03:20
@lucasbraum
lucasbraum merged commit 765de77 into main Oct 13, 2026
10 checks passed
@lucasbraum
lucasbraum deleted the lucasbraum/upt-23-make-the-agent-sdk-executor-the-default-for-anthropic branch October 13, 2026 03:23
@uptide-release uptide-release Bot mentioned this pull request Oct 13, 2026
lucasbraum pushed a commit that referenced this pull request Oct 13, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## [email protected]

### Minor Changes

- [#93](#93)
[`765de77`](765de77)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide fix
<package>` with Anthropic selected runs assisted fixes as one Claude
Agent SDK session in the temporary clone, covering the package's manual
sites and their rule knowledge, gated once at the end of the session. It
is the default when `@anthropic-ai/claude-agent-sdk`, an optional peer
that is never bundled, is installed next to Uptide; without it, the
patch executor runs and the output says what to install. Use `--agent
patch` to opt out; other providers keep the patch executor. See
`docs/decisions/0016-agent-sdk-executor.md`.
  
Stripe period helpers accept both endpoint payload shapes, and both
executors share the same period knowledge.

- [#94](#94)
[`5f54bad`](5f54bad)
Thanks [@lucasbraum](https://github.com/lucasbraum)! -
`uptide/onboarding` loads where it broke: under plain Node ESM, Vitest
and Turbopack, and in a browser bundle. It no longer inlines `yaml` (its
CommonJS build called `require("process")` inside an ES module); `yaml`
is now a dependency of the package. The entry is pure, with no file
system and no Node globals: `loadUptideConfig` and `snapshotFromDisk`
move to `uptide/onboarding/node` (breaking for code that imported them
from `uptide/onboarding`). The command line is unchanged.

- [#92](#92)
[`b21a911`](b21a911)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Uptide
Action: `action.yml` at the root of this repository now runs Uptide in a
repository's own GitHub Actions (`mode: list | check | fix`, `package`,
`config`, `anthropic-api-key`, `app-url`). It builds the engine of its
own pinned commit, migrates with `--agent sdk` by default, and opens
draft pull requests with a short-lived installation token of the Uptide
GitHub App, obtained for the job's OIDC token, so those pull requests
run the repository's CI. Each run writes an `uptide.run/v1` report to
the job summary and sends it to the Uptide app; a failed upload is a
warning. It replaces the earlier Renovate/Dependabot pull-request
checker that lived at the same path; workflows pinned to an earlier
commit keep running that one.
  
New `uptide/report` export: the `uptide.run/v1` types, its JSON Schema
(also `uptide/report/schema.json`), a validator and the summary
renderer. The report holds no source code, diffs, snippets or
environment values: paths, line numbers, symbol names and counts only.
  
`uptide init` and the "Add Uptide" pull request now write `permissions:
contents: read, id-token: write`; the Action pushes with the Uptide
GitHub App's token instead of `GITHUB_TOKEN`.

### Patch Changes

- [#96](#96)
[`b9c1d71`](b9c1d71)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Assisted fixes
group two sites of one file into one task only when their fix is in the
same place: the same repository declarations behind each compiler error,
or none. Two React 19 `RefObject<T | null>` errors in one file whose
prop types live in two components were sent as one task that could edit
only the first component, and both stayed manual (a regression in
0.8.0).

Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant