Recognize sign-in failures for every agent and fall through
Agents / agent (pull_request) Has been cancelled
Check / deno (pull_request) Failing after 35s

Codex re-runs device login on revoked, expired, or reused sessions and
token_revoked/401 errors, not only invalid_refresh_token. Claude and
OpenCode credential rejections are classified too. Sign-in failures fall
through to the next profile, and the failure comment names each tried
profile with a fixed reason label.
This commit is contained in:
Danny Kim
2026-10-12 11:38:21 +09:00
parent ea20f6d629
commit 3565988249
11 changed files with 411 additions and 36 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { join } from "jsr:@std/path@1";
import { parseCredentials } from "./credentials.ts";
import type { BotProfile } from "./profiles.ts";
import type { BotProfile, ProfileFailure } from "./profiles.ts";
const FIRST_PROFILE_UID = 20_000;
@@ -28,7 +28,7 @@ export type RuntimeOutcome =
anchorsPath: string;
profile: Pick<RuntimeProfile, "type" | "model">;
}
| { ok: false };
| { ok: false; failures: ProfileFailure[] };
async function writePrivate(
path: string,