Skip to content

Migrate the retired Anthropic API engine to Claude Code - #39

Merged
A21-devs merged 1 commit into
A21-devs:mainfrom
Daytonrad:fix/retired-agent-engine
Nov 25, 2026
Merged

A21-devs merged 1 commit into
A21-devs:mainfrom
Daytonrad:fix/retired-agent-engine

Conversation

@Daytonrad

Copy link
Copy Markdown
Contributor

Closes #22.

Settings › Agents now offers the implemented engines. Loading a saved anthropic-api selection selects Claude Code, and a note by the dropdown explains the migration. The regression test covers loading the old value and reloading the normalized settings. Historical Access log entries keep their original labels.

Checklist

  • npm run check passed on Windows (typecheck, module boundaries, 2,802 unit tests passed and one skipped, production build).
  • Changed interface wording lives in src/ui/copy.ts.
  • The regression uses synthetic settings only.

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a clean fix. I checked it against every point in #22:

  • The dropdown no longer offers the engine that isn't built.
  • A saved anthropic-api loads as claude-cli in migrateSettingsChecked. The plugin, the runner (runner/host.ts, runner/settingsLoader.ts) and settingsStore all load through it, so nothing still sees the old value and falls through.
  • The note's wording lives in copy.ts.
  • The test covers both the first load and a reload of the fixed settings.
  • EngineKind, ledgerReader and recordReader keep their anthropic-api labels, so old Access log rows still read correctly.

I checked out the branch and ran npm ci && npm run check on Windows: 161 files, 2,802 passed, 1 skipped, and the build is fine. There are no dependency or workflow changes.

Two small things below. Neither blocks merging, and I'll tidy them up in a follow-up.

Comment thread src/shared/settings.ts
@@ -43,7 +43,7 @@ export type MotionPref = "system" | "reduced" | "full";
export type AgeColours = "hue" | "lightness";
export type ModelRole = "labels" | "summaries" | "maps" | "ask";
/** Only the Claude Code CLI is built; the other two are listed as "later" and disabled (§5.27). */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is out of date now. Codex CLI and the local model are both built, and nothing is listed as "later" any more. Something like "The agent engines Settings › Agents offers. A stored anthropic-api from older builds loads as claude-cli" would match the code.

Comment thread src/plugin/settingsTab.ts
this.toggle(c.organise, c.organiseDesc, a.enabled, (x, v) => void (x.agents.enabled = v));
this.dropdown(c.engine, a.engine === "none" ? c.engineNoneDesc : undefined, { "claude-cli": c.engineCli, "codex-cli": c.engineCodex, "anthropic-api": c.engineApi, local: c.engineLocal, none: c.engineNone }, a.engine, (x, v) => void (x.agents.engine = v), true);
this.dropdown(c.engine, a.engine === "none" ? c.engineNoneDesc : undefined, { "claude-cli": c.engineCli, "codex-cli": c.engineCodex, local: c.engineLocal, none: c.engineNone }, a.engine, (x, v) => void (x.agents.engine = v), true);
if (a.engine === "claude-cli" && this.host.settings().issues.some((issue) => issue.path === "agents.engine" && issue.problem === "unknown-value")) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issues on the handle only refreshes on reload(), so the note stays for the rest of the session. That includes switching to another engine and back to Claude Code. It's harmless, because the migrated value is what gets saved on the next change. I just wanted it noted in case someone wonders why the note outlives the fix.

@A21-devs
A21-devs merged commit cc9af14 into A21-devs:main Nov 25, 2026
1 check passed
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.

Choosing "Anthropic API (later)" in Settings > Agents silently runs Claude Code

2 participants