fix: normalize Claude CLI auth mode to oauth (#855)

Thanks @sebslight.

Co-authored-by: Sebastian <sebslight@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-15 02:28:48 +00:00
parent 3c51290e0d
commit 2fb2035dbf
7 changed files with 137 additions and 6 deletions

View File

@@ -10,6 +10,20 @@ import {
} from "./legacy.shared.js";
export const LEGACY_CONFIG_MIGRATIONS_PART_3: LegacyConfigMigration[] = [
{
id: "auth.anthropic-claude-cli-mode-oauth",
describe: "Switch anthropic:claude-cli auth profile mode to oauth",
apply: (raw, changes) => {
const auth = getRecord(raw.auth);
const profiles = getRecord(auth?.profiles);
if (!profiles) return;
const claudeCli = getRecord(profiles["anthropic:claude-cli"]);
if (!claudeCli) return;
if (claudeCli.mode !== "token") return;
claudeCli.mode = "oauth";
changes.push('Updated auth.profiles["anthropic:claude-cli"].mode → "oauth".');
},
},
{
id: "agent.defaults-v2",
describe: "Move agent config to agents.defaults and tools",