From 6624a166b5bef416b24acb3d7533d23974d91557 Mon Sep 17 00:00:00 2001
From: ndycode <405533+ndycode@users.noreply.github.com>
Date: Mon, 6 Apr 2026 19:32:08 +0800
Subject: [PATCH 1/2] feat!: rename package and migrate runtime storage

---
 .codex-plugin/plugin.json                     |   4 +-
 config/minimal-opencode.json                  |   2 +-
 config/opencode-legacy.json                   |   2 +-
 config/opencode-modern.json                   |   2 +-
 index.ts                                      |   4 +-
 lib/auto-update-checker.ts                    |   2 +-
 lib/constants.ts                              |  23 ++-
 lib/oauth-success.html                        |   2 +-
 lib/recovery/index.ts                         |   2 +-
 lib/storage.ts                                | 162 ++++++++++++------
 package-lock.json                             |  10 +-
 package.json                                  |  14 +-
 ...js => install-oc-codex-multi-auth-core.js} |  53 +++---
 scripts/install-oc-codex-multi-auth.js        |  15 ++
 scripts/test-all-models.sh                    |   2 +-
 .../SKILL.md                                  |  14 +-
 test/audit.race.test.ts                       |   2 +-
 test/index.test.ts                            |   6 +-
 ...ts => install-oc-codex-multi-auth.test.ts} |  27 +--
 test/login-runner.test.ts                     |   2 +-
 test/rotation-integration.test.ts             |   2 +-
 test/storage-async.test.ts                    |   4 +-
 test/storage.test.ts                          |   7 +-
 23 files changed, 223 insertions(+), 140 deletions(-)
 rename scripts/{install-opencode-codex-auth.js => install-oc-codex-multi-auth-core.js} (88%)
 mode change 100755 => 100644
 create mode 100755 scripts/install-oc-codex-multi-auth.js
 rename skills/{oc-chatgpt-setup => oc-codex-setup}/SKILL.md (75%)
 rename test/{install-opencode-codex-auth.test.ts => install-oc-codex-multi-auth.test.ts} (85%)

diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 186772f6..f0e244a4 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
 {
-  "name": "oc-chatgpt-multi-auth",
+  "name": "oc-codex-multi-auth",
   "version": "5.4.9",
-  "description": "Install and operate oc-chatgpt-multi-auth for OpenCode with ChatGPT Plus/Pro OAuth, GPT-5 and Codex model presets, and multi-account failover.",
+  "description": "Install and operate oc-codex-multi-auth for OpenCode with Codex-first GPT-5 workflows, ChatGPT Plus/Pro OAuth, and multi-account failover.",
   "skills": "./skills/"
 }
diff --git a/config/minimal-opencode.json b/config/minimal-opencode.json
index 16656299..c22c5bfb 100644
--- a/config/minimal-opencode.json
+++ b/config/minimal-opencode.json
@@ -1,6 +1,6 @@
 {
   "$schema": "https://opencode.ai/config.json",
-  "plugin": ["oc-chatgpt-multi-auth"],
+  "plugin": ["oc-codex-multi-auth"],
 
   "provider": {
     "openai": {
diff --git a/config/opencode-legacy.json b/config/opencode-legacy.json
index 6d6b3b4e..eee7e5fe 100644
--- a/config/opencode-legacy.json
+++ b/config/opencode-legacy.json
@@ -1,7 +1,7 @@
 {
   "$schema": "https://opencode.ai/config.json",
   "plugin": [
-    "oc-chatgpt-multi-auth"
+    "oc-codex-multi-auth"
   ],
   "provider": {
     "openai": {
diff --git a/config/opencode-modern.json b/config/opencode-modern.json
index 0ca7f4a4..a41ea9b1 100644
--- a/config/opencode-modern.json
+++ b/config/opencode-modern.json
@@ -1,7 +1,7 @@
 {
   "$schema": "https://opencode.ai/config.json",
   "plugin": [
-    "oc-chatgpt-multi-auth"
+    "oc-codex-multi-auth"
   ],
   "provider": {
     "openai": {
diff --git a/index.ts b/index.ts
index b9a0a3fa..9cb117bc 100644
--- a/index.ts
+++ b/index.ts
@@ -19,7 +19,7 @@
  *
  * @license MIT (see LICENSE file)
  * @author numman-ali
- * @repository https://github.com/ndycode/oc-chatgpt-multi-auth
+ * @repository https://github.com/ndycode/oc-codex-multi-auth
 
  */
 
@@ -240,7 +240,7 @@ function upsertFlaggedAccountRecord(
  * @example
  * ```json
  * {
- *   "plugin": ["oc-chatgpt-multi-auth"],
+ *   "plugin": ["oc-codex-multi-auth"],
 
  *   "model": "openai/gpt-5-codex"
  * }
diff --git a/lib/auto-update-checker.ts b/lib/auto-update-checker.ts
index 5e354e99..fe496fa0 100644
--- a/lib/auto-update-checker.ts
+++ b/lib/auto-update-checker.ts
@@ -5,7 +5,7 @@ import { createLogger } from "./logger.js";
 
 const log = createLogger("update-checker");
 
-const PACKAGE_NAME = "oc-chatgpt-multi-auth";
+const PACKAGE_NAME = "oc-codex-multi-auth";
 const NPM_REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}/latest`;
 const CACHE_DIR = join(homedir(), ".opencode", "cache");
 const CACHE_FILE = join(CACHE_DIR, "update-check-cache.json");
diff --git a/lib/constants.ts b/lib/constants.ts
index 85882db6..b6e5597a 100644
--- a/lib/constants.ts
+++ b/lib/constants.ts
@@ -3,8 +3,21 @@
  * Centralized for easy maintenance and configuration
  */
 
+/** Published package identifier used across runtime messages and install flows */
+export const PACKAGE_NAME = "oc-codex-multi-auth";
+
+/** Previous published package identifier kept for installer and storage migration */
+export const LEGACY_PACKAGE_NAME = "oc-chatgpt-multi-auth";
+
 /** Plugin identifier for logging and error messages */
-export const PLUGIN_NAME = "openai-codex-plugin";
+export const PLUGIN_NAME = PACKAGE_NAME;
+
+/** Storage file names for active and legacy account data */
+export const ACCOUNTS_FILE_NAME = "oc-codex-multi-auth-accounts.json";
+export const LEGACY_ACCOUNTS_FILE_NAME = "openai-codex-accounts.json";
+export const FLAGGED_ACCOUNTS_FILE_NAME = "oc-codex-multi-auth-flagged-accounts.json";
+export const LEGACY_FLAGGED_ACCOUNTS_FILE_NAME = "openai-codex-flagged-accounts.json";
+export const LEGACY_BLOCKED_ACCOUNTS_FILE_NAME = "openai-codex-blocked-accounts.json";
 
 /** Base URL for ChatGPT backend API */
 export const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
@@ -74,10 +87,10 @@ export const PLATFORM_OPENERS = {
 
 /** OAuth authorization labels */
 export const AUTH_LABELS = {
-	OAUTH: "ChatGPT Plus/Pro MULTI (Codex Subscription)",
-	OAUTH_DEVICE_CODE: "ChatGPT Plus/Pro MULTI (Device Code)",
-	OAUTH_MANUAL: "ChatGPT Plus/Pro MULTI (Manual URL Paste)",
-	API_KEY: "Manually enter API Key MULTI",
+	OAUTH: "Codex OAuth (ChatGPT Plus/Pro)",
+	OAUTH_DEVICE_CODE: "Codex OAuth (Device Code)",
+	OAUTH_MANUAL: "Codex OAuth (Manual URL Paste)",
+	API_KEY: "Manual API Key (Advanced)",
 	INSTRUCTIONS:
 		"A browser window should open. If it doesn't, copy the URL and open it manually.",
 	INSTRUCTIONS_MANUAL:
diff --git a/lib/oauth-success.html b/lib/oauth-success.html
index 2dfa3a4e..36d54e53 100644
--- a/lib/oauth-success.html
+++ b/lib/oauth-success.html
@@ -548,7 +548,7 @@
                 <div class="terminal-button red"></div>
                 <div class="terminal-button yellow"></div>
                 <div class="terminal-button green"></div>
-                <div class="terminal-title">oc-chatgpt-multi-auth — OAuth Authentication</div>
+                <div class="terminal-title">oc-codex-multi-auth — OAuth Authentication</div>
             </div>
 
             <div class="status-box">
diff --git a/lib/recovery/index.ts b/lib/recovery/index.ts
index 1d64855b..e3359c95 100644
--- a/lib/recovery/index.ts
+++ b/lib/recovery/index.ts
@@ -1,5 +1,5 @@
 /**
- * Session recovery module for oc-chatgpt-multi-auth.
+ * Session recovery module for oc-codex-multi-auth.
  *
  * Provides recovery from:
  * - tool_result_missing: Interrupted tool executions
diff --git a/lib/storage.ts b/lib/storage.ts
index b0c179ca..3cadab41 100644
--- a/lib/storage.ts
+++ b/lib/storage.ts
@@ -1,7 +1,14 @@
 import { promises as fs, existsSync } from "node:fs";
 import { randomBytes } from "node:crypto";
 import { basename, dirname, join } from "node:path";
-import { ACCOUNT_LIMITS } from "./constants.js";
+import {
+  ACCOUNT_LIMITS,
+  ACCOUNTS_FILE_NAME,
+  FLAGGED_ACCOUNTS_FILE_NAME,
+  LEGACY_ACCOUNTS_FILE_NAME,
+  LEGACY_BLOCKED_ACCOUNTS_FILE_NAME,
+  LEGACY_FLAGGED_ACCOUNTS_FILE_NAME,
+} from "./constants.js";
 import { createLogger } from "./logger.js";
 import { MODEL_FAMILIES, type ModelFamily } from "./prompts/codex.js";
 import { AnyAccountStorageSchema, getValidationErrors } from "./schemas.js";
@@ -19,10 +26,6 @@ import {
 export type { CooldownReason, RateLimitStateV3, AccountMetadataV1, AccountStorageV1, AccountMetadataV3, AccountStorageV3 };
 
 const log = createLogger("storage");
-const ACCOUNTS_FILE_NAME = "openai-codex-accounts.json";
-const FLAGGED_ACCOUNTS_FILE_NAME = "openai-codex-flagged-accounts.json";
-const LEGACY_FLAGGED_ACCOUNTS_FILE_NAME = "openai-codex-blocked-accounts.json";
-
 export interface FlaggedAccountMetadataV1 extends AccountMetadataV3 {
 	flaggedAt: number;
 	flaggedReason?: string;
@@ -283,7 +286,7 @@ export function setStoragePath(projectPath: string | null): void {
   if (projectRoot) {
     currentProjectRoot = projectRoot;
     currentStoragePath = join(getProjectGlobalConfigDir(projectRoot), ACCOUNTS_FILE_NAME);
-    currentLegacyProjectStoragePath = join(getProjectConfigDir(projectRoot), ACCOUNTS_FILE_NAME);
+    currentLegacyProjectStoragePath = join(getProjectConfigDir(projectRoot), LEGACY_ACCOUNTS_FILE_NAME);
   } else {
     currentStoragePath = null;
     currentLegacyProjectStoragePath = null;
@@ -316,55 +319,66 @@ function getLegacyFlaggedAccountsPath(): string {
 	return join(dirname(getStoragePath()), LEGACY_FLAGGED_ACCOUNTS_FILE_NAME);
 }
 
-async function migrateLegacyProjectStorageIfNeeded(
-  persist: (storage: AccountStorageV3) => Promise<void> = saveAccounts,
+function getLegacyBlockedAccountsPath(): string {
+	return join(dirname(getStoragePath()), LEGACY_BLOCKED_ACCOUNTS_FILE_NAME);
+}
+
+async function migrateStorageFileIfNeeded(
+  legacyPath: string | null,
+  nextPath: string,
+  persist: (storage: AccountStorageV3) => Promise<void>,
+  label: string,
 ): Promise<AccountStorageV3 | null> {
-  if (
-    !currentStoragePath ||
-    !currentLegacyProjectStoragePath ||
-    currentLegacyProjectStoragePath === currentStoragePath ||
-    !existsSync(currentLegacyProjectStoragePath)
-  ) {
+  if (!legacyPath || legacyPath === nextPath || !existsSync(legacyPath)) {
     return null;
   }
 
   try {
-    const legacyContent = await fs.readFile(currentLegacyProjectStoragePath, "utf-8");
+    const legacyContent = await fs.readFile(legacyPath, "utf-8");
     const legacyData = JSON.parse(legacyContent) as unknown;
     const normalized = normalizeAccountStorage(legacyData);
     if (!normalized) return null;
 
     await persist(normalized);
     try {
-      await fs.unlink(currentLegacyProjectStoragePath);
-      log.info("Removed legacy project account storage file after migration", {
-        path: currentLegacyProjectStoragePath,
-      });
+      await fs.unlink(legacyPath);
+      log.info(`Removed legacy ${label} after migration`, { path: legacyPath });
     } catch (unlinkError) {
       const code = (unlinkError as NodeJS.ErrnoException).code;
       if (code !== "ENOENT") {
-        log.warn("Failed to remove legacy project account storage file after migration", {
-          path: currentLegacyProjectStoragePath,
+        log.warn(`Failed to remove legacy ${label} after migration`, {
+          path: legacyPath,
           error: String(unlinkError),
         });
       }
     }
-    log.info("Migrated legacy project account storage", {
-      from: currentLegacyProjectStoragePath,
-      to: currentStoragePath,
+    log.info(`Migrated legacy ${label}`, {
+      from: legacyPath,
+      to: nextPath,
       accounts: normalized.accounts.length,
     });
     return normalized;
   } catch (error) {
-    log.warn("Failed to migrate legacy project account storage", {
-      from: currentLegacyProjectStoragePath,
-      to: currentStoragePath,
+    log.warn(`Failed to migrate legacy ${label}`, {
+      from: legacyPath,
+      to: nextPath,
       error: String(error),
     });
     return null;
   }
 }
 
+async function migrateLegacyProjectStorageIfNeeded(
+  persist: (storage: AccountStorageV3) => Promise<void> = saveAccounts,
+): Promise<AccountStorageV3 | null> {
+  return migrateStorageFileIfNeeded(
+    currentLegacyProjectStoragePath,
+    getStoragePath(),
+    persist,
+    "project account storage",
+  );
+}
+
 function selectNewestAccount<T extends AccountLike>(
   current: T | undefined,
   candidate: T,
@@ -708,6 +722,24 @@ function getGlobalAccountsStoragePath(): string {
   return join(getConfigDir(), ACCOUNTS_FILE_NAME);
 }
 
+function getLegacyGlobalAccountsStoragePath(): string {
+  return join(getConfigDir(), LEGACY_ACCOUNTS_FILE_NAME);
+}
+
+async function migrateLegacyGlobalStorageIfNeeded(): Promise<AccountStorageV3 | null> {
+  const nextPath = getGlobalAccountsStoragePath();
+  const persistGlobalStorage = async (storage: AccountStorageV3): Promise<void> => {
+    await writeAccountsToPathUnlocked(nextPath, storage);
+  };
+
+  return migrateStorageFileIfNeeded(
+    getLegacyGlobalAccountsStoragePath(),
+    nextPath,
+    persistGlobalStorage,
+    "global account storage",
+  );
+}
+
 /**
  * Returns true when project-scoped storage is active and a global fallback is meaningful.
  */
@@ -724,6 +756,11 @@ async function loadGlobalAccountsFallback(): Promise<AccountStorageV3 | null> {
     return null;
   }
 
+  const migrated = await migrateLegacyGlobalStorageIfNeeded();
+  if (migrated) {
+    return migrated;
+  }
+
   const globalStoragePath = getGlobalAccountsStoragePath();
   if (globalStoragePath === currentStoragePath) {
     return null;
@@ -802,6 +839,13 @@ async function loadAccountsInternal(
         ? await migrateLegacyProjectStorageIfNeeded(persistMigration)
         : null;
       if (migrated) return migrated;
+      if (!shouldUseProjectGlobalFallback()) {
+        const migratedGlobal = persistMigration
+          ? await migrateLegacyGlobalStorageIfNeeded()
+          : null;
+        if (migratedGlobal) return migratedGlobal;
+        return null;
+      }
       const globalFallback = await loadGlobalAccountsFallback();
       if (!globalFallback) return null;
 
@@ -847,8 +891,7 @@ async function loadAccountsInternal(
  * Writes account storage without acquiring the outer storage mutex.
  * Callers must already be inside withStorageLock when using this helper directly.
  */
-async function saveAccountsUnlocked(storage: AccountStorageV3): Promise<void> {
-  const path = getStoragePath();
+async function writeAccountsToPathUnlocked(path: string, storage: AccountStorageV3): Promise<void> {
   const uniqueSuffix = `${Date.now()}.${Math.random().toString(36).slice(2, 8)}`;
   const tempPath = `${path}.${uniqueSuffix}.tmp`;
 
@@ -897,6 +940,10 @@ async function saveAccountsUnlocked(storage: AccountStorageV3): Promise<void> {
   }
 }
 
+async function saveAccountsUnlocked(storage: AccountStorageV3): Promise<void> {
+  await writeAccountsToPathUnlocked(getStoragePath(), storage);
+}
+
 /**
  * Executes a read-modify-write transaction under the storage lock and exposes
  * an unlocked persist callback so nested save operations do not deadlock.
@@ -1057,37 +1104,40 @@ async function loadFlaggedAccountsUnlocked(
 		}
 	}
 
-	const legacyPath = getLegacyFlaggedAccountsPath();
-	if (!existsSync(legacyPath)) {
-		return empty;
-	}
-
-	try {
-		const legacyContent = await fs.readFile(legacyPath, "utf-8");
-		const legacyData = JSON.parse(legacyContent) as unknown;
-		const migrated = normalizeFlaggedStorage(legacyData);
-		if (migrated.accounts.length > 0) {
-			await saveUnlocked(migrated);
+	for (const legacyPath of [getLegacyFlaggedAccountsPath(), getLegacyBlockedAccountsPath()]) {
+		if (!existsSync(legacyPath)) {
+			continue;
 		}
+
 		try {
-			await fs.unlink(legacyPath);
-		} catch {
-			// Best effort cleanup.
+			const legacyContent = await fs.readFile(legacyPath, "utf-8");
+			const legacyData = JSON.parse(legacyContent) as unknown;
+			const migrated = normalizeFlaggedStorage(legacyData);
+			if (migrated.accounts.length > 0) {
+				await saveUnlocked(migrated);
+			}
+			try {
+				await fs.unlink(legacyPath);
+			} catch {
+				// Best effort cleanup.
+			}
+			log.info("Migrated legacy flagged account storage", {
+				from: legacyPath,
+				to: path,
+				accounts: migrated.accounts.length,
+			});
+			return migrated;
+		} catch (error) {
+			log.error("Failed to migrate legacy flagged account storage", {
+				from: legacyPath,
+				to: path,
+				error: String(error),
+			});
+			return empty;
 		}
-		log.info("Migrated legacy flagged account storage", {
-			from: legacyPath,
-			to: path,
-			accounts: migrated.accounts.length,
-		});
-		return migrated;
-	} catch (error) {
-		log.error("Failed to migrate legacy flagged account storage", {
-			from: legacyPath,
-			to: path,
-			error: String(error),
-		});
-		return empty;
 	}
+
+	return empty;
 }
 
 export async function loadFlaggedAccounts(): Promise<FlaggedAccountStorageV1> {
diff --git a/package-lock.json b/package-lock.json
index 4494241f..7d1dd403 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
-  "name": "oc-chatgpt-multi-auth",
-  "version": "5.4.9",
+  "name": "oc-codex-multi-auth",
+  "version": "6.0.0",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
-      "name": "oc-chatgpt-multi-auth",
-      "version": "5.4.9",
+      "name": "oc-codex-multi-auth",
+      "version": "6.0.0",
       "license": "MIT",
       "dependencies": {
         "@openauthjs/openauth": "^0.4.3",
@@ -15,7 +15,7 @@
         "zod": "^4.3.6"
       },
       "bin": {
-        "oc-chatgpt-multi-auth": "scripts/install-opencode-codex-auth.js"
+        "oc-codex-multi-auth": "scripts/install-oc-codex-multi-auth.js"
       },
       "devDependencies": {
         "@fast-check/vitest": "^0.2.4",
diff --git a/package.json b/package.json
index 362b0ba7..0ffb5a13 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
-  "name": "oc-chatgpt-multi-auth",
-  "version": "5.4.9",
-  "description": "OpenCode plugin for using ChatGPT Plus/Pro in GPT-5 and Codex workflows with OAuth login, multi-account rotation, and guided setup",
+  "name": "oc-codex-multi-auth",
+  "version": "6.0.0",
+  "description": "OpenCode plugin for Codex-first GPT-5 workflows with ChatGPT Plus/Pro OAuth, multi-account rotation, and guided setup",
   "main": "./dist/index.js",
   "types": "./dist/index.d.ts",
   "type": "module",
@@ -9,7 +9,7 @@
   "author": "Numman Ali",
   "repository": {
     "type": "git",
-    "url": "git+https://github.com/ndycode/oc-chatgpt-multi-auth.git"
+    "url": "git+https://github.com/ndycode/oc-codex-multi-auth.git"
   },
   "keywords": [
     "typescript",
@@ -29,9 +29,9 @@
     "developer-tools",
     "terminal"
   ],
-  "homepage": "https://github.com/ndycode/oc-chatgpt-multi-auth#readme",
+  "homepage": "https://github.com/ndycode/oc-codex-multi-auth#readme",
   "bugs": {
-    "url": "https://github.com/ndycode/oc-chatgpt-multi-auth/issues"
+    "url": "https://github.com/ndycode/oc-codex-multi-auth/issues"
   },
   "scripts": {
     "build": "tsc && node scripts/copy-oauth-success.js",
@@ -55,7 +55,7 @@
     "prepare": "husky"
   },
   "bin": {
-    "oc-chatgpt-multi-auth": "scripts/install-opencode-codex-auth.js"
+    "oc-codex-multi-auth": "scripts/install-oc-codex-multi-auth.js"
   },
   "files": [
     "dist/",
diff --git a/scripts/install-opencode-codex-auth.js b/scripts/install-oc-codex-multi-auth-core.js
old mode 100755
new mode 100644
similarity index 88%
rename from scripts/install-opencode-codex-auth.js
rename to scripts/install-oc-codex-multi-auth-core.js
index 644d756b..59e8e5c8
--- a/scripts/install-opencode-codex-auth.js
+++ b/scripts/install-oc-codex-multi-auth-core.js
@@ -1,17 +1,20 @@
-#!/usr/bin/env node
-
 import { existsSync } from "node:fs";
 import { copyFile, mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
 import { homedir } from "node:os";
 import { dirname, join, resolve } from "node:path";
 import { fileURLToPath } from "node:url";
 
-const PLUGIN_NAME = "oc-chatgpt-multi-auth";
+const PACKAGE_NAME = "oc-codex-multi-auth";
+const LEGACY_PACKAGE_NAMES = ["oc-chatgpt-multi-auth"];
 const WINDOWS_RENAME_RETRY_ATTEMPTS = 5;
 const WINDOWS_RENAME_RETRY_BASE_DELAY_MS = 10;
 
+function getManagedPackageNames() {
+	return [PACKAGE_NAME, ...LEGACY_PACKAGE_NAMES];
+}
+
 function printHelp() {
-	console.log(`Usage: ${PLUGIN_NAME} [--modern|--legacy] [--dry-run] [--no-cache-clear]\n\n` +
+	console.log(`Usage: ${PACKAGE_NAME} [--modern|--legacy] [--dry-run] [--no-cache-clear]\n\n` +
 		"Default behavior:\n" +
 		"  - Installs/updates global config at ~/.config/opencode/opencode.json\n" +
 		"  - Uses full catalog config by default (9 base models + 34 explicit presets)\n" +
@@ -61,7 +64,7 @@ function buildPaths(homeDir) {
 		configDir,
 		configPath: join(configDir, "opencode.json"),
 		cacheDir,
-		cacheNodeModules: join(cacheDir, "node_modules", PLUGIN_NAME),
+		cacheNodeModulesPaths: getManagedPackageNames().map((name) => join(cacheDir, "node_modules", name)),
 		cacheBunLock: join(cacheDir, "bun.lock"),
 		cachePackageJson: join(cacheDir, "package.json"),
 		modernTemplatePath,
@@ -94,11 +97,12 @@ function parseCliArgs(argv = process.argv.slice(2)) {
 
 function normalizePluginList(list) {
 	const entries = Array.isArray(list) ? list.filter(Boolean) : [];
+	const managedNames = getManagedPackageNames();
 	const filtered = entries.filter((entry) => {
 		if (typeof entry !== "string") return true;
-		return entry !== PLUGIN_NAME && !entry.startsWith(`${PLUGIN_NAME}@`);
+		return !managedNames.some((name) => entry === name || entry.startsWith(`${name}@`));
 	});
-	return [...filtered, PLUGIN_NAME];
+	return [...filtered, PACKAGE_NAME];
 }
 
 function formatJson(obj) {
@@ -143,8 +147,6 @@ async function renameWithWindowsRetry(sourcePath, destinationPath) {
 			return;
 		} catch (error) {
 			if (isWindowsLockError(error)) {
-				// Windows desktop installs often see brief AV/indexer locks on config
-				// files, so retry the atomic rename before surfacing a hard failure.
 				lastError = error;
 				await delay(WINDOWS_RENAME_RETRY_BASE_DELAY_MS * 2 ** attempt);
 				continue;
@@ -246,9 +248,13 @@ async function removePluginFromCachePackage(paths, dryRun) {
 	let changed = false;
 	for (const section of sections) {
 		const deps = cacheData?.[section];
-		if (deps && typeof deps === "object" && PLUGIN_NAME in deps) {
-			delete deps[PLUGIN_NAME];
-			changed = true;
+		if (deps && typeof deps === "object") {
+			for (const name of getManagedPackageNames()) {
+				if (name in deps) {
+					delete deps[name];
+					changed = true;
+				}
+			}
 		}
 	}
 
@@ -257,7 +263,7 @@ async function removePluginFromCachePackage(paths, dryRun) {
 	}
 
 	if (dryRun) {
-		log(`[dry-run] Would update ${paths.cachePackageJson} to remove ${PLUGIN_NAME}`);
+		log(`[dry-run] Would update ${paths.cachePackageJson} to remove ${getManagedPackageNames().join(", ")}`);
 		return;
 	}
 
@@ -272,10 +278,14 @@ async function clearCache(paths, dryRun, skipCacheClear) {
 	}
 
 	if (dryRun) {
-		log(`[dry-run] Would remove ${paths.cacheNodeModules}`);
+		for (const cacheNodeModulesPath of paths.cacheNodeModulesPaths) {
+			log(`[dry-run] Would remove ${cacheNodeModulesPath}`);
+		}
 		log(`[dry-run] Would remove ${paths.cacheBunLock}`);
 	} else {
-		await rm(paths.cacheNodeModules, { recursive: true, force: true });
+		for (const cacheNodeModulesPath of paths.cacheNodeModulesPaths) {
+			await rm(cacheNodeModulesPath, { recursive: true, force: true });
+		}
 		await rm(paths.cacheBunLock, { force: true });
 	}
 
@@ -305,7 +315,7 @@ export async function runInstaller(argv = process.argv.slice(2), options = {}) {
 	}
 
 	const template = await loadTemplate(configMode, paths);
-	template.plugin = [PLUGIN_NAME];
+	template.plugin = [PACKAGE_NAME];
 
 	let nextConfig = template;
 	if (existsSync(paths.configPath)) {
@@ -323,8 +333,6 @@ export async function runInstaller(argv = process.argv.slice(2), options = {}) {
 			merged.provider = provider;
 			nextConfig = merged;
 		} catch (error) {
-			// Only log the filesystem/parser message. Never echo config bodies because
-			// opencode.json may carry provider credentials or tokens.
 			log(`Warning: Could not parse existing config (${formatErrorForLog(error)}). Replacing with template.`);
 			nextConfig = template;
 		}
@@ -335,8 +343,6 @@ export async function runInstaller(argv = process.argv.slice(2), options = {}) {
 	if (dryRun) {
 		log(`[dry-run] Would write ${paths.configPath} using ${configMode} config`);
 	} else {
-		// Persist through a temp file plus rename so Windows AV/file locks do not
-		// leave a truncated opencode.json behind during installer updates.
 		await writeFileAtomic(paths.configPath, formatJson(nextConfig));
 		log(`Wrote ${paths.configPath} (${configMode} config)`);
 	}
@@ -373,10 +379,3 @@ export const __test = {
 	renameWithWindowsRetry,
 	resolveHomeDirectory,
 };
-
-if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
-	runInstaller().catch((error) => {
-		console.error(`Installer failed: ${formatErrorForLog(error)}`);
-		process.exit(1);
-	});
-}
diff --git a/scripts/install-oc-codex-multi-auth.js b/scripts/install-oc-codex-multi-auth.js
new file mode 100755
index 00000000..0a651f15
--- /dev/null
+++ b/scripts/install-oc-codex-multi-auth.js
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+
+import { resolve } from "node:path";
+import { fileURLToPath } from "node:url";
+import { runInstaller } from "./install-oc-codex-multi-auth-core.js";
+
+export * from "./install-oc-codex-multi-auth-core.js";
+
+if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
+	runInstaller().catch((error) => {
+		const message = error instanceof Error ? error.message : String(error);
+		console.error(`Installer failed: ${message}`);
+		process.exit(1);
+	});
+}
diff --git a/scripts/test-all-models.sh b/scripts/test-all-models.sh
index 62a4c6a9..7224608d 100755
--- a/scripts/test-all-models.sh
+++ b/scripts/test-all-models.sh
@@ -149,7 +149,7 @@ update_config() {
     esac
 
     # Replace npm package with local dist for testing
-    sed -i.bak -E 's|"oc-chatgpt-multi-auth(@[^"]*)?"|"file://'"${REPO_DIR}"'/dist"|' "${OPENCODE_JSON}"
+    sed -i.bak -E 's|"oc-codex-multi-auth(@[^"]*)?"|"file://'"${REPO_DIR}"'/dist"|' "${OPENCODE_JSON}"
 
     rm -f "${OPENCODE_JSON}.bak"
     echo "✓ Using local dist for plugin"
diff --git a/skills/oc-chatgpt-setup/SKILL.md b/skills/oc-codex-setup/SKILL.md
similarity index 75%
rename from skills/oc-chatgpt-setup/SKILL.md
rename to skills/oc-codex-setup/SKILL.md
index 1a249187..923d8766 100644
--- a/skills/oc-chatgpt-setup/SKILL.md
+++ b/skills/oc-codex-setup/SKILL.md
@@ -1,16 +1,16 @@
 ---
-name: oc-chatgpt-setup
-description: Install or refresh oc-chatgpt-multi-auth in OpenCode, choose the right config mode, and verify ChatGPT Plus or Pro OAuth login.
+name: oc-codex-setup
+description: Install or refresh oc-codex-multi-auth in OpenCode, choose the right config mode, and verify Codex OAuth with ChatGPT Plus or Pro access.
 ---
 
-# oc-chatgpt-setup
+# oc-codex-setup
 
-Use this skill when the user wants to install, reinstall, upgrade, or troubleshoot `oc-chatgpt-multi-auth` in OpenCode.
+Use this skill when the user wants to install, reinstall, upgrade, or troubleshoot `oc-codex-multi-auth` in OpenCode.
 
 ## Default install
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest
+npx -y oc-codex-multi-auth@latest
 ```
 
 Use this when the user wants the full catalog config, including base entries like `gpt-5.4` and preset entries like `gpt-5.4-high`.
@@ -18,7 +18,7 @@ Use this when the user wants the full catalog config, including base entries lik
 ## Modern compact install
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest --modern
+npx -y oc-codex-multi-auth@latest --modern
 ```
 
 Use this on OpenCode `v1.0.210+` when the user wants the compact variant-based config.
@@ -40,7 +40,7 @@ opencode run "Refactor the retry logic and update the tests" --model=openai/gpt-
 
 ## Troubleshooting
 
-- Confirm `"plugin": ["oc-chatgpt-multi-auth"]` is present in the OpenCode config.
+- Confirm `"plugin": ["oc-codex-multi-auth"]` is present in the OpenCode config.
 - Re-run `opencode auth login` if tokens expired or the wrong workspace was selected.
 - Inspect `~/.opencode/logs/codex-plugin/` after a failed request.
 - Set `ENABLE_PLUGIN_REQUEST_LOGGING=1` for deeper request logging.
diff --git a/test/audit.race.test.ts b/test/audit.race.test.ts
index d8c14878..9eacbf5e 100644
--- a/test/audit.race.test.ts
+++ b/test/audit.race.test.ts
@@ -5,7 +5,7 @@ import path from "node:path";
 import os from "node:os";
 
 describe("Audit Logger - Concurrency Tests", () => {
-    const testLogDir = path.join(os.tmpdir(), "oc-chatgpt-multi-auth-test-audit-2");
+    const testLogDir = path.join(os.tmpdir(), "oc-codex-multi-auth-test-audit-2");
     
     beforeAll(() => {
         if (fs.existsSync(testLogDir)) {
diff --git a/test/index.test.ts b/test/index.test.ts
index d5f40ff1..2af3dc06 100644
--- a/test/index.test.ts
+++ b/test/index.test.ts
@@ -579,9 +579,9 @@ describe("OpenAIOAuthPlugin", () => {
 
 		it("has three auth methods", () => {
 			expect(plugin.auth.methods).toHaveLength(3);
-			expect(plugin.auth.methods[0].label).toBe("ChatGPT Plus/Pro MULTI (Codex Subscription)");
-			expect(plugin.auth.methods[1].label).toBe("ChatGPT Plus/Pro MULTI (Device Code)");
-			expect(plugin.auth.methods[2].label).toBe("ChatGPT Plus/Pro MULTI (Manual URL Paste)");
+			expect(plugin.auth.methods[0].label).toBe("Codex OAuth (ChatGPT Plus/Pro)");
+			expect(plugin.auth.methods[1].label).toBe("Codex OAuth (Device Code)");
+			expect(plugin.auth.methods[2].label).toBe("Codex OAuth (Manual URL Paste)");
 		});
 
 		it("rejects manual OAuth callbacks with mismatched state", async () => {
diff --git a/test/install-opencode-codex-auth.test.ts b/test/install-oc-codex-multi-auth.test.ts
similarity index 85%
rename from test/install-opencode-codex-auth.test.ts
rename to test/install-oc-codex-multi-auth.test.ts
index e68e629e..0a4284a3 100644
--- a/test/install-opencode-codex-auth.test.ts
+++ b/test/install-oc-codex-multi-auth.test.ts
@@ -12,10 +12,10 @@ type OpenAiTemplate = {
 };
 
 async function createTempHome() {
-	return mkdtemp(join(tmpdir(), "oc-chatgpt-install-"));
+	return mkdtemp(join(tmpdir(), "oc-codex-install-"));
 }
 
-describe("install-opencode-codex-auth script", () => {
+describe("install-oc-codex-multi-auth script", () => {
 	let tempHome: string | null = null;
 
 	afterEach(async () => {
@@ -31,21 +31,21 @@ describe("install-opencode-codex-auth script", () => {
 		vi.resetModules();
 		const logSpy = vi.spyOn(console, "log").mockImplementation(() => {});
 		const errorSpy = vi.spyOn(console, "error").mockImplementation(() => {});
-		const { runInstaller } = await import("../scripts/install-opencode-codex-auth.js");
+		const { runInstaller } = await import("../scripts/install-oc-codex-multi-auth-core.js");
 
 		await expect(runInstaller(["--modern", "--legacy", "--help"])).resolves.toMatchObject({
 			action: "help",
 			exitCode: 0,
 		});
 
-		expect(logSpy).toHaveBeenCalledWith(expect.stringContaining("Usage: oc-chatgpt-multi-auth"));
+		expect(logSpy).toHaveBeenCalledWith(expect.stringContaining("Usage: oc-codex-multi-auth"));
 		expect(errorSpy).not.toHaveBeenCalled();
 	});
 
 	it("writes the merged full catalog and normalizes plugin entries", async () => {
 		vi.resetModules();
 		tempHome = await createTempHome();
-		const { runInstaller } = await import("../scripts/install-opencode-codex-auth.js");
+		const { runInstaller } = await import("../scripts/install-oc-codex-multi-auth-core.js");
 		const configDir = join(tempHome, ".config", "opencode");
 		const configPath = join(configDir, "opencode.json");
 
@@ -91,7 +91,7 @@ describe("install-opencode-codex-auth script", () => {
 		};
 
 		expect(saved.customSetting).toBe(true);
-		expect(saved.plugin).toEqual(["existing-plugin", "oc-chatgpt-multi-auth"]);
+		expect(saved.plugin).toEqual(["existing-plugin", "oc-codex-multi-auth"]);
 		expect(saved.provider.anthropic).toEqual({ baseURL: "https://example.invalid" });
 		const modernTemplate = JSON.parse(
 			await readFile(new URL("../config/opencode-modern.json", import.meta.url), "utf-8"),
@@ -116,16 +116,18 @@ describe("install-opencode-codex-auth script", () => {
 	it("keeps cache files when --no-cache-clear is set but still unpins the cached package entry", async () => {
 		vi.resetModules();
 		tempHome = await createTempHome();
-		const { runInstaller } = await import("../scripts/install-opencode-codex-auth.js");
+		const { runInstaller } = await import("../scripts/install-oc-codex-multi-auth-core.js");
 		const configDir = join(tempHome, ".config", "opencode");
 		const configPath = join(configDir, "opencode.json");
 		const cacheDir = join(tempHome, ".cache", "opencode");
-		const cacheNodeModules = join(cacheDir, "node_modules", "oc-chatgpt-multi-auth");
+		const legacyCacheNodeModules = join(cacheDir, "node_modules", "oc-chatgpt-multi-auth");
+		const cacheNodeModules = join(cacheDir, "node_modules", "oc-codex-multi-auth");
 		const cacheBunLock = join(cacheDir, "bun.lock");
 		const cachePackageJson = join(cacheDir, "package.json");
 
 		await mkdir(configDir, { recursive: true });
 		await mkdir(cacheNodeModules, { recursive: true });
+		await mkdir(legacyCacheNodeModules, { recursive: true });
 		await writeFile(configPath, JSON.stringify({ plugin: [] }, null, 2), "utf-8");
 		await writeFile(cacheBunLock, "lockfile", "utf-8");
 		await writeFile(
@@ -134,6 +136,7 @@ describe("install-opencode-codex-auth script", () => {
 				{
 					dependencies: {
 						"oc-chatgpt-multi-auth": "file:../pinned-plugin.tgz",
+						"oc-codex-multi-auth": "file:../new-plugin.tgz",
 						other: "^1.0.0",
 					},
 				},
@@ -159,16 +162,18 @@ describe("install-opencode-codex-auth script", () => {
 
 		await expect(readFile(cacheBunLock, "utf-8")).resolves.toBe("lockfile");
 		await expect(readdir(cacheNodeModules)).resolves.toEqual([]);
+		await expect(readdir(legacyCacheNodeModules)).resolves.toEqual([]);
 		const cachePackage = JSON.parse(await readFile(cachePackageJson, "utf-8")) as {
 			dependencies: Record<string, string>;
 		};
 		expect(cachePackage.dependencies["oc-chatgpt-multi-auth"]).toBeUndefined();
+		expect(cachePackage.dependencies["oc-codex-multi-auth"]).toBeUndefined();
 		expect(cachePackage.dependencies.other).toBe("^1.0.0");
 	});
 
 	it("rejects full-mode merges when modern and legacy templates overlap", async () => {
 		vi.resetModules();
-		const { __test } = await import("../scripts/install-opencode-codex-auth.js");
+		const { __test } = await import("../scripts/install-oc-codex-multi-auth-core.js");
 
 		const modernTemplate = {
 			provider: {
@@ -210,7 +215,7 @@ describe("install-opencode-codex-auth script", () => {
 			};
 		});
 
-		const { __test } = await import("../scripts/install-opencode-codex-auth.js");
+		const { __test } = await import("../scripts/install-oc-codex-multi-auth-core.js");
 		const backupPath = await __test.backupConfig(sourcePath, false);
 
 		expect(copyFileMock).toHaveBeenCalledTimes(2);
@@ -233,7 +238,7 @@ describe("install-opencode-codex-auth script", () => {
 			};
 		});
 
-		const { __test } = await import("../scripts/install-opencode-codex-auth.js");
+		const { __test } = await import("../scripts/install-oc-codex-multi-auth-core.js");
 		await expect(__test.renameWithWindowsRetry("from.tmp", "to.json")).resolves.toBeUndefined();
 		expect(renameMock).toHaveBeenCalledTimes(2);
 		expect(renameMock).toHaveBeenNthCalledWith(1, "from.tmp", "to.json");
diff --git a/test/login-runner.test.ts b/test/login-runner.test.ts
index c63d6099..aab2355d 100644
--- a/test/login-runner.test.ts
+++ b/test/login-runner.test.ts
@@ -37,7 +37,7 @@ describe("login-runner persistAccountPool", () => {
 			tmpdir(),
 			`login-runner-${Date.now()}-${Math.random().toString(36).slice(2)}`,
 		);
-		storagePath = join(testDir, "openai-codex-accounts.json");
+		storagePath = join(testDir, "oc-codex-multi-auth-accounts.json");
 		await fs.mkdir(testDir, { recursive: true });
 		setStoragePathDirect(storagePath);
 	});
diff --git a/test/rotation-integration.test.ts b/test/rotation-integration.test.ts
index c3309dd8..2416b3eb 100644
--- a/test/rotation-integration.test.ts
+++ b/test/rotation-integration.test.ts
@@ -55,7 +55,7 @@ function createStorageFromTestAccounts(accounts: typeof TEST_ACCOUNTS): AccountS
 
 const TEST_STORAGE_PATH = join(
   tmpdir(),
-  `oc-chatgpt-multi-auth-rotation-integration-${process.pid}-${Date.now()}.json`,
+  `oc-codex-multi-auth-rotation-integration-${process.pid}-${Date.now()}.json`,
 );
 
 describe("Multi-Account Rotation Integration", () => {
diff --git a/test/storage-async.test.ts b/test/storage-async.test.ts
index 49ed85ad..3ee06d21 100644
--- a/test/storage-async.test.ts
+++ b/test/storage-async.test.ts
@@ -257,9 +257,9 @@ describe("Storage Module - Async Operations", () => {
   });
 
   describe("getStoragePath", () => {
-    it("returns path ending with openai-codex-accounts.json", () => {
+    it("returns path ending with oc-codex-multi-auth-accounts.json", () => {
       const path = getStoragePath();
-      expect(path).toMatch(/openai-codex-accounts\.json$/);
+      expect(path).toMatch(/oc-codex-multi-auth-accounts\.json$/);
     });
 
     it("returns path containing .opencode directory", () => {
diff --git a/test/storage.test.ts b/test/storage.test.ts
index 87b0ea50..84361c09 100644
--- a/test/storage.test.ts
+++ b/test/storage.test.ts
@@ -401,6 +401,7 @@ describe("storage", () => {
     });
 
     it("preserves same refresh token across different organizationId values during import", async () => {
+      setStoragePathDirect(testStoragePath);
       await fs.writeFile(
         exportPath,
         JSON.stringify({
@@ -1573,7 +1574,7 @@ describe("storage", () => {
       let attemptCount = 0;
       const renameSpy = vi.spyOn(fs, "rename").mockImplementation(async (oldPath, newPath) => {
         const destination = String(newPath);
-        if (destination.includes("openai-codex-flagged-accounts.json")) {
+        if (destination.includes("oc-codex-multi-auth-flagged-accounts.json")) {
           attemptCount += 1;
           if (attemptCount <= 2) {
             const err = new Error("EBUSY error") as NodeJS.ErrnoException;
@@ -1631,7 +1632,7 @@ describe("storage", () => {
     it("sets project-scoped path under global .opencode when project root found", () => {
       setStoragePath(process.cwd());
       const path = getStoragePath();
-      expect(path).toContain("openai-codex-accounts.json");
+      expect(path).toContain("oc-codex-multi-auth-accounts.json");
       expect(path).toContain(".opencode");
       expect(path).toContain("projects");
     });
@@ -1650,7 +1651,7 @@ describe("storage", () => {
     it("returns global path when no custom path set", () => {
       setStoragePathDirect(null);
       const path = getStoragePath();
-      expect(path).toContain("openai-codex-accounts.json");
+      expect(path).toContain("oc-codex-multi-auth-accounts.json");
     });
   });
 

From ebab222d5c06c395418657b18e996bbc9c113ae4 Mon Sep 17 00:00:00 2001
From: ndycode <405533+ndycode@users.noreply.github.com>
Date: Mon, 6 Apr 2026 19:32:29 +0800
Subject: [PATCH 2/2] docs: refresh codex-first rebrand and cutover notes

---
 AGENTS.md                                |  4 +--
 CHANGELOG.md                             |  6 ++++-
 CONTRIBUTING.md                          |  2 +-
 README.md                                | 25 ++++++++++++------
 assets/readme-hero.svg                   |  8 +++---
 config/README.md                         |  2 +-
 docs/_config.yml                         |  2 +-
 docs/configuration.md                    | 12 ++++-----
 docs/development/CONFIG_FIELDS.md        |  4 +--
 docs/development/CONFIG_FLOW.md          | 14 +++++------
 docs/development/TESTING.md              |  8 +++---
 docs/development/TUI_PARITY_CHECKLIST.md |  2 +-
 docs/faq.md                              |  4 +--
 docs/getting-started.md                  | 26 +++++++++----------
 docs/index.md                            |  4 +--
 docs/privacy.md                          |  6 ++---
 docs/troubleshooting.md                  | 32 ++++++++++++------------
 test/README.md                           |  2 +-
 18 files changed, 88 insertions(+), 75 deletions(-)

diff --git a/AGENTS.md b/AGENTS.md
index 0b99c566..36c915f9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -64,8 +64,8 @@ npm run lint        # eslint
 ## NOTES
 - OAuth callback: `http://127.0.0.1:1455/auth/callback`.
 - ChatGPT backend requires `store: false`, include `reasoning.encrypted_content`.
-- Per-project accounts: `~/.opencode/projects/<project-key>/openai-codex-accounts.json` (walks up to find project root).
-- Global accounts: `~/.opencode/openai-codex-accounts.json`.
+- Per-project accounts: `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` (walks up to find project root).
+- Global accounts: `~/.opencode/oc-codex-multi-auth-accounts.json`.
 - Prompt templates synced from Codex CLI GitHub releases with ETag caching.
 - 5xx server errors trigger account rotation and health penalty (same as network errors).
 - API deprecation/sunset headers (RFC 8594) are logged as warnings.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91f97703..cea08093 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
 
 all notable changes to this project. dates are ISO format (YYYY-MM-DD).
 
-## [unreleased]
+## [6.0.0] - 2026-04-06
 
 ### added
 
@@ -12,6 +12,7 @@ all notable changes to this project. dates are ISO format (YYYY-MM-DD).
 - **backup/import safety controls**: `codex-export` now supports auto timestamped backup paths; `codex-import` adds `dryRun` preview and automatic pre-import backup on apply.
 - **beginner safe mode config**: new `beginnerSafeMode` config key and `CODEX_AUTH_BEGINNER_SAFE_MODE` env override for conservative retry behavior.
 - **startup preflight summary**: one-time startup health summary with recommended next action.
+- **breaking rebrand migration**: current runtime storage now uses package-aligned files (`oc-codex-multi-auth-accounts.json`, `oc-codex-multi-auth-flagged-accounts.json`) with automatic migration from legacy package-era and pre-package storage names on first load.
 
 ### changed
 
@@ -19,12 +20,15 @@ all notable changes to this project. dates are ISO format (YYYY-MM-DD).
 - **docs refresh for operational flows**: README + docs portal/development guides updated to reflect beginner commands, safe mode, interactive picker behavior, and backup/import safeguards.
 - **repository presentation refresh**: rewrote the README as a landing page, added a public FAQ and code of conduct, refreshed package metadata, and removed stale CI/test claims from public docs surfaces.
 - **test matrix expansion**: coverage now includes beginner UI helpers, safe-fix diagnostics edge cases, tag/note command behavior, and timestamped backup/import preview utilities.
+- **package line renamed**: the supported package, repo, plugin entry, installer surface, and docs now use `oc-codex-multi-auth` instead of `oc-chatgpt-multi-auth`.
+- **codex-first auth wording**: OAuth options, installer guidance, and onboarding docs now describe the Codex-first flow directly instead of the older MULTI-branded labels.
 
 ### fixed
 
 - **non-interactive command guidance**: optional-index commands provide explicit usage guidance when interactive menus are unavailable.
 - **doctor safe-fix edge path**: `codex-doctor fix` now reports a clear non-crashing message when no eligible account is available for auto-switch.
 - **first-time import flow**: `codex-import` no longer fails with `No accounts to export` when storage is empty; pre-import backup is skipped cleanly in zero-account setups.
+- **installer cache hygiene**: the installer now removes both the old and new package names from OpenCode cache metadata so cutover installs do not stay pinned to stale artifacts.
 
 ## [5.4.8] - 2026-03-24
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 192bf09b..995b9516 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
 # Contributing
 
-Thank you for contributing to `oc-chatgpt-multi-auth`.
+Thank you for contributing to `oc-codex-multi-auth`.
 
 This project accepts improvements that make the OpenCode plugin clearer, safer, easier to maintain, and more useful for personal development workflows.
 
diff --git a/README.md b/README.md
index 75aac059..0d308f62 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-# oc-chatgpt-multi-auth
+# oc-codex-multi-auth
 
-[![npm version](https://img.shields.io/npm/v/oc-chatgpt-multi-auth.svg)](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
-[![npm downloads](https://img.shields.io/npm/dw/oc-chatgpt-multi-auth.svg)](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
+[![npm version](https://img.shields.io/npm/v/oc-codex-multi-auth.svg)](https://www.npmjs.com/package/oc-codex-multi-auth)
+[![npm downloads](https://img.shields.io/npm/dw/oc-codex-multi-auth.svg)](https://www.npmjs.com/package/oc-codex-multi-auth)
 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
 
 Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/Codex model presets, and multi-account failover.
 
-`oc-chatgpt-multi-auth` is an OpenCode plugin for developers who want ChatGPT-backed GPT-5 and Codex workflows in OpenCode without switching to separate Platform API credentials for personal use. It uses the same official OAuth flow as the Codex CLI, adds model templates for current GPT-5 families, and can rotate across multiple ChatGPT accounts when one account is rate-limited or unavailable.
+`oc-codex-multi-auth` is an OpenCode plugin for developers who want Codex-first GPT-5 workflows in OpenCode without switching to separate Platform API credentials for personal use. It uses the same official OAuth flow as the Codex CLI, adds model templates for current GPT-5 families, and can rotate across multiple ChatGPT accounts when one account is rate-limited or unavailable.
 
 ## What This Project Does
 
@@ -19,7 +19,7 @@ Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/C
 
 ```bash
 # 1. Install or refresh the plugin config
-npx -y oc-chatgpt-multi-auth@latest
+npx -y oc-codex-multi-auth@latest
 
 # 2. Sign in with ChatGPT Plus/Pro
 opencode auth login
@@ -32,7 +32,7 @@ What the installer does:
 
 - writes `~/.config/opencode/opencode.json`
 - backs up an existing config before changing it
-- normalizes the plugin entry to `"oc-chatgpt-multi-auth"`
+- normalizes the plugin entry to `"oc-codex-multi-auth"`
 - clears the cached plugin copy so OpenCode reinstalls the latest package
 
 By default, the installer now writes a full catalog config that includes both:
@@ -103,7 +103,7 @@ Use the quick-start path above for the fastest setup. For full setup, local deve
 If you prefer the compact variant-only config on OpenCode `v1.0.210+`, use:
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest --modern
+npx -y oc-codex-multi-auth@latest --modern
 ```
 
 ## Configuration
@@ -125,7 +125,16 @@ Start here if the plugin does not load or authenticate correctly:
 
 Common first checks:
 
-- confirm `"plugin": ["oc-chatgpt-multi-auth"]` is present in your OpenCode config
+- confirm `"plugin": ["oc-codex-multi-auth"]` is present in your OpenCode config
+
+## 6.0.0 Cutover
+
+This release intentionally breaks the old package line and moves the runtime to package-aligned storage names.
+
+- Rename the GitHub repository to `ndycode/oc-codex-multi-auth`
+- Publish `oc-codex-multi-auth@6.0.0`
+- Deprecate `oc-chatgpt-multi-auth` on npm with a pointer to the new package
+- Verify docs, badges, repo links, and OpenCode config examples all resolve to `oc-codex-multi-auth`
 - rerun `opencode auth login`
 - inspect `~/.opencode/logs/codex-plugin/` after running one request with `ENABLE_PLUGIN_REQUEST_LOGGING=1`
 
diff --git a/assets/readme-hero.svg b/assets/readme-hero.svg
index 5d400f3e..ad99000f 100644
--- a/assets/readme-hero.svg
+++ b/assets/readme-hero.svg
@@ -1,4 +1,4 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="OpenCode Codex OAuth">
+<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="oc-codex-multi-auth">
   <defs>
     <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
       <stop offset="0%" stop-color="#0f172a" />
@@ -20,12 +20,12 @@
     <path d="M205 80 L235 220" />
   </g>
   <text x="420" y="120" fill="#e2e8f0" font-size="42" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif" font-weight="600">
-    OpenCode Codex OAuth
+    oc-codex-multi-auth
   </text>
   <text x="420" y="170" fill="#cbd5f5" font-size="24" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
-    ChatGPT Plus/Pro auth for GPT-5.2 and Codex models
+    Codex-first ChatGPT Plus/Pro auth for OpenCode
   </text>
   <text x="420" y="220" fill="#7dd3fc" font-size="18" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
-    One-command install, modern variants, full tool support
+    One-command install, account migration, modern variants
   </text>
 </svg>
diff --git a/config/README.md b/config/README.md
index 64e5a035..a01b9811 100644
--- a/config/README.md
+++ b/config/README.md
@@ -1,6 +1,6 @@
 # Configuration
 
-This directory contains the official OpenCode config templates for the ChatGPT Codex OAuth plugin.
+This directory contains the official OpenCode config templates for `oc-codex-multi-auth`.
 
 ## Required: choose the right config file
 
diff --git a/docs/_config.yml b/docs/_config.yml
index f8fff0e9..87d631da 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -1,4 +1,4 @@
 theme: jekyll-theme-hacker
-title: oc-chatgpt-multi-auth
+title: oc-codex-multi-auth
 description: Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login and GPT-5/Codex presets
 show_downloads: true
diff --git a/docs/configuration.md b/docs/configuration.md
index 5e8c870b..66e083f0 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,6 +1,6 @@
 # Configuration Reference
 
-Complete reference for configuring `oc-chatgpt-multi-auth`. Most of this is optional; the defaults work for most people.
+Complete reference for configuring `oc-codex-multi-auth`. Most of this is optional; the defaults work for most people.
 
 ---
 
@@ -9,7 +9,7 @@ Complete reference for configuring `oc-chatgpt-multi-auth`. Most of this is opti
 ```json
 {
   "$schema": "https://opencode.ai/config.json",
-  "plugin": ["oc-chatgpt-multi-auth"],
+  "plugin": ["oc-codex-multi-auth"],
   "provider": {
     "openai": {
       "options": {
@@ -256,7 +256,7 @@ same settings for all models:
 
 ```json
 {
-  "plugin": ["oc-chatgpt-multi-auth"],
+  "plugin": ["oc-codex-multi-auth"],
   "provider": {
     "openai": {
       "options": {
@@ -303,7 +303,7 @@ model options override global options.
 global (`~/.config/opencode/opencode.json`):
 ```json
 {
-  "plugin": ["oc-chatgpt-multi-auth"],
+  "plugin": ["oc-codex-multi-auth"],
   "provider": {
     "openai": {
       "options": { "reasoningEffort": "medium" }
@@ -335,8 +335,8 @@ result: project uses `high`, other projects use `medium`.
 | `<project>/.opencode.json` | project-specific config |
 | `~/.opencode/openai-codex-auth-config.json` | plugin config |
 | `~/.opencode/auth/openai.json` | oauth tokens |
-| `~/.opencode/openai-codex-accounts.json` | global account storage |
-| `~/.opencode/projects/<project-key>/openai-codex-accounts.json` | per-project account storage |
+| `~/.opencode/oc-codex-multi-auth-accounts.json` | global account storage |
+| `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` | per-project account storage |
 | `~/.opencode/backups/codex-backup-YYYYMMDD-HHMMSSmmm-<hex>.json` | timestamped export backup (global storage mode) |
 | `~/.opencode/projects/<project-key>/backups/codex-backup-YYYYMMDD-HHMMSSmmm-<hex>.json` | timestamped export backup (per-project storage mode) |
 | `.../backups/codex-pre-import-backup-YYYYMMDD-HHMMSSmmm-<hex>.json` | automatic snapshot created before non-dry-run imports when existing accounts are present |
diff --git a/docs/development/CONFIG_FIELDS.md b/docs/development/CONFIG_FIELDS.md
index 412de89c..7dc58b77 100644
--- a/docs/development/CONFIG_FIELDS.md
+++ b/docs/development/CONFIG_FIELDS.md
@@ -1,6 +1,6 @@
 # Config Fields
 
-This document summarizes the current config fields that matter for `oc-chatgpt-multi-auth`.
+This document summarizes the current config fields that matter for `oc-codex-multi-auth`.
 
 ## Top-Level Fields
 
@@ -10,7 +10,7 @@ Use the plain package name in OpenCode config:
 
 ```json
 {
-  "plugin": ["oc-chatgpt-multi-auth"]
+  "plugin": ["oc-codex-multi-auth"]
 }
 ```
 
diff --git a/docs/development/CONFIG_FLOW.md b/docs/development/CONFIG_FLOW.md
index 4f5968e6..254bd9cb 100644
--- a/docs/development/CONFIG_FLOW.md
+++ b/docs/development/CONFIG_FLOW.md
@@ -1,6 +1,6 @@
 # OpenCode Config Flow
 
-This document describes the current config surfaces used by `oc-chatgpt-multi-auth` on `main`.
+This document describes the current config surfaces used by `oc-codex-multi-auth` on `main`.
 
 ## Primary Config Surfaces
 
@@ -45,17 +45,17 @@ That file controls plugin behavior such as retry policy, beginner safe mode, fal
 
 ## Installer Flow
 
-`scripts/install-opencode-codex-auth.js` performs these steps:
+`scripts/install-oc-codex-multi-auth.js` performs these steps:
 
 1. Load the selected template set (`full` by default, `config/opencode-modern.json` with `--modern`, `config/opencode-legacy.json` with `--legacy`).
 2. Back up an existing `~/.config/opencode/opencode.json`.
-3. Normalize the plugin list so it ends with plain `oc-chatgpt-multi-auth`.
+3. Normalize the plugin list so it ends with plain `oc-codex-multi-auth`.
 4. Replace `provider.openai` with the selected shipped template block.
 5. Clear the cached OpenCode plugin copy under `~/.cache/opencode/`.
 
 Important detail:
 
-- The installer intentionally writes the plugin entry as `oc-chatgpt-multi-auth`, not `oc-chatgpt-multi-auth@latest`.
+- The installer intentionally writes the plugin entry as `oc-codex-multi-auth`, not `oc-codex-multi-auth@latest`.
 - The default `full` install mode merges the modern base-model template with the explicit legacy preset entries so users can access `--variant` workflows and still see the full shipped preset catalog directly.
 
 ## Shipped Template Structure
@@ -86,7 +86,7 @@ Example shape:
 
 ```json
 {
-  "plugin": ["oc-chatgpt-multi-auth"],
+  "plugin": ["oc-codex-multi-auth"],
   "provider": {
     "openai": {
       "options": {
@@ -170,8 +170,8 @@ Important runtime behavior:
 | `<project>/.opencode.json` | project-local OpenCode override |
 | `~/.opencode/openai-codex-auth-config.json` | plugin runtime config |
 | `~/.opencode/auth/openai.json` | OAuth token storage |
-| `~/.opencode/openai-codex-accounts.json` | global account storage |
-| `~/.opencode/projects/<project-key>/openai-codex-accounts.json` | per-project account storage |
+| `~/.opencode/oc-codex-multi-auth-accounts.json` | global account storage |
+| `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` | per-project account storage |
 | `~/.opencode/logs/codex-plugin/` | plugin request/debug logs |
 
 ## See Also
diff --git a/docs/development/TESTING.md b/docs/development/TESTING.md
index 4cfd3a8f..90c26dc3 100644
--- a/docs/development/TESTING.md
+++ b/docs/development/TESTING.md
@@ -1,6 +1,6 @@
 # Testing Guide
 
-This guide describes the current validation surface for `oc-chatgpt-multi-auth` on `main`.
+This guide describes the current validation surface for `oc-codex-multi-auth` on `main`.
 
 ## Release-Grade Commands
 
@@ -46,7 +46,7 @@ When documentation changes touch setup or config guidance, verify the docs again
 
 1. Confirm commands exist in `index.ts`.
 2. Confirm config examples match `config/opencode-modern.json`, `config/opencode-legacy.json`, and `config/minimal-opencode.json`.
-3. Confirm install/update guidance matches `scripts/install-opencode-codex-auth.js`.
+3. Confirm install/update guidance matches `scripts/install-oc-codex-multi-auth.js`.
 4. Confirm repo scripts listed in docs still exist in `package.json`.
 
 Useful commands:
@@ -63,14 +63,14 @@ Use these when a change affects setup, auth flow, or account operations.
 ### Install + config smoke
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest --dry-run
+npx -y oc-codex-multi-auth@latest --dry-run
 opencode debug config
 ```
 
 Verify:
 
 - the global config path is `~/.config/opencode/opencode.json`
-- the plugin entry resolves to `oc-chatgpt-multi-auth`
+- the plugin entry resolves to `oc-codex-multi-auth`
 - the selected template contributes the expected `provider.openai` block
 
 ### Model surface smoke
diff --git a/docs/development/TUI_PARITY_CHECKLIST.md b/docs/development/TUI_PARITY_CHECKLIST.md
index 84b71832..5026b414 100644
--- a/docs/development/TUI_PARITY_CHECKLIST.md
+++ b/docs/development/TUI_PARITY_CHECKLIST.md
@@ -1,6 +1,6 @@
 # TUI Parity Checklist (Codex Multi-Auth)
 
-Use this checklist to keep `oc-chatgpt-multi-auth` aligned with the Antigravity-style auth TUI pattern, while preserving Codex-specific logic and storage behavior.
+Use this checklist to keep `oc-codex-multi-auth` aligned with the Antigravity-style auth TUI pattern, while preserving Codex-specific logic and storage behavior.
 
 ## Scope
 
diff --git a/docs/faq.md b/docs/faq.md
index 732a1dd6..51635a2a 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -2,7 +2,7 @@
 
 ## What is this project?
 
-`oc-chatgpt-multi-auth` is an OpenCode plugin that lets you sign in with ChatGPT Plus/Pro through OAuth and use GPT-5/Codex model presets from OpenCode.
+`oc-codex-multi-auth` is an OpenCode plugin that lets you sign in with ChatGPT Plus/Pro through OAuth and use GPT-5/Codex model presets from OpenCode.
 
 ## Who is it for?
 
@@ -41,4 +41,4 @@ Start with [Troubleshooting](troubleshooting.md), rerun `opencode auth login`, a
 
 ## I used the old package name. What changed?
 
-The package was renamed from `opencode-openai-codex-auth-multi` to `oc-chatgpt-multi-auth`. If you still reference the old name in your OpenCode config, replace it with `oc-chatgpt-multi-auth`.
+The package was renamed from `opencode-openai-codex-auth-multi` to `oc-chatgpt-multi-auth`, and now from `oc-chatgpt-multi-auth` to `oc-codex-multi-auth`. If you still reference either older name in your OpenCode config, replace it with `oc-codex-multi-auth`.
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 5e510b60..f847eed3 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -1,6 +1,6 @@
 # Getting Started
 
-This guide covers the full installation and first-run flow for `oc-chatgpt-multi-auth`.
+This guide covers the full installation and first-run flow for `oc-codex-multi-auth`.
 
 ## Before You Begin
 
@@ -22,12 +22,12 @@ This guide covers the full installation and first-run flow for `oc-chatgpt-multi
 ## Fastest Install Path
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest
+npx -y oc-codex-multi-auth@latest
 opencode auth login
 opencode run "Explain this repository" --model=openai/gpt-5.4 --variant=medium
 ```
 
-The installer updates `~/.config/opencode/opencode.json`, backs up the previous config, normalizes the plugin entry to `oc-chatgpt-multi-auth`, and clears the cached plugin copy so OpenCode reinstalls the latest package.
+The installer updates `~/.config/opencode/opencode.json`, backs up the previous config, normalizes the plugin entry to `oc-codex-multi-auth`, and clears the cached plugin copy so OpenCode reinstalls the latest package.
 
 By default, the installer writes a full catalog config so you get both:
 - modern base model entries such as `gpt-5.4` for `--variant` workflows
@@ -36,13 +36,13 @@ By default, the installer writes a full catalog config so you get both:
 If you prefer the compact variant-only config on OpenCode `v1.0.210+`, use:
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest --modern
+npx -y oc-codex-multi-auth@latest --modern
 ```
 
 If you explicitly want the older explicit-only layout, use:
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest --legacy
+npx -y oc-codex-multi-auth@latest --legacy
 ```
 
 ## Install from Source
@@ -50,8 +50,8 @@ npx -y oc-chatgpt-multi-auth@latest --legacy
 Use this only when you want to develop or test the plugin locally.
 
 ```bash
-git clone https://github.com/ndycode/oc-chatgpt-multi-auth.git
-cd oc-chatgpt-multi-auth
+git clone https://github.com/ndycode/oc-codex-multi-auth.git
+cd oc-codex-multi-auth
 npm ci
 npm run build
 ```
@@ -60,7 +60,7 @@ Point OpenCode at the built plugin:
 
 ```json
 {
-  "plugin": ["file:///absolute/path/to/oc-chatgpt-multi-auth/dist"]
+  "plugin": ["file:///absolute/path/to/oc-codex-multi-auth/dist"]
 }
 ```
 
@@ -77,7 +77,7 @@ opencode auth login
 Then choose:
 
 1. `OpenAI`
-2. `ChatGPT Plus/Pro (Codex Subscription)`
+2. `Codex OAuth (ChatGPT Plus/Pro)`
 
 The browser-based OAuth flow uses the same local callback port as Codex CLI: `http://127.0.0.1:1455/auth/callback`.
 
@@ -86,9 +86,9 @@ The browser-based OAuth flow uses the same local callback port as Codex CLI: `ht
 If you are on SSH, WSL, or another environment where the browser callback flow is inconvenient:
 
 1. rerun `opencode auth login`
-2. choose `ChatGPT Plus/Pro MULTI (Device Code)`
+2. choose `Codex OAuth (Device Code)`
 3. open the verification link, enter the one-time code, and wait for login to finish
-4. if device code is unavailable on your auth server, fall back to `ChatGPT Plus/Pro MULTI (Manual URL Paste)`
+4. if device code is unavailable on your auth server, fall back to `Codex OAuth (Manual URL Paste)`
 
 ## Add the Plugin to OpenCode
 
@@ -97,7 +97,7 @@ If you are not using the installer, edit `~/.config/opencode/opencode.json` manu
 ```json
 {
   "$schema": "https://opencode.ai/config.json",
-  "plugin": ["oc-chatgpt-multi-auth"]
+  "plugin": ["oc-codex-multi-auth"]
 }
 ```
 
@@ -185,7 +185,7 @@ This mode forces a more conservative retry profile and reduces the chance of lon
 From npm:
 
 ```bash
-npx -y oc-chatgpt-multi-auth@latest
+npx -y oc-codex-multi-auth@latest
 ```
 
 From a local clone:
diff --git a/docs/index.md b/docs/index.md
index 6111492f..14d0a2b9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,4 +1,4 @@
-# oc-chatgpt-multi-auth Docs
+# oc-codex-multi-auth Docs
 
 Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/Codex model presets, and multi-account failover.
 
@@ -24,4 +24,4 @@ Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/C
 - [Changelog](../CHANGELOG.md)
 - [Contributing](../CONTRIBUTING.md)
 - [Security Policy](../SECURITY.md)
-- [npm package](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
+- [npm package](https://www.npmjs.com/package/oc-codex-multi-auth)
diff --git a/docs/privacy.md b/docs/privacy.md
index 5dffef82..8ef368c2 100644
--- a/docs/privacy.md
+++ b/docs/privacy.md
@@ -1,6 +1,6 @@
 # Privacy & Data Handling
 
-This page explains how `oc-chatgpt-multi-auth` handles local data, upstream requests, and debugging artifacts.
+This page explains how `oc-codex-multi-auth` handles local data, upstream requests, and debugging artifacts.
 
 ## Overview
 
@@ -171,7 +171,7 @@ However, data sent to OpenAI is subject to OpenAI's privacy practices.
 
 ### Open Source
 The entire plugin source code is available at:
-- **GitHub:** [https://github.com/ndycode/oc-chatgpt-multi-auth](https://github.com/ndycode/oc-chatgpt-multi-auth)
+- **GitHub:** [https://github.com/ndycode/oc-codex-multi-auth](https://github.com/ndycode/oc-codex-multi-auth)
 
 
 You can:
@@ -191,7 +191,7 @@ You can:
 ## Questions?
 
 For privacy-related questions:
-- **Plugin-specific:** [GitHub Issues](https://github.com/ndycode/oc-chatgpt-multi-auth/issues)
+- **Plugin-specific:** [GitHub Issues](https://github.com/ndycode/oc-codex-multi-auth/issues)
 
 - **OpenAI data handling:** [OpenAI Support](https://help.openai.com/)
 - **Security concerns:** See [SECURITY.md](../SECURITY.md)
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index b5f72732..2471ea32 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -1,6 +1,6 @@
 # Troubleshooting
 
-Common setup, authentication, model, and request-debugging issues for `oc-chatgpt-multi-auth`.
+Common setup, authentication, model, and request-debugging issues for `oc-codex-multi-auth`.
 
 ---
 
@@ -47,18 +47,18 @@ if (plugin.includes("opencode-openai-codex-auth") || plugin.includes("opencode-c
 
 **Resolution:**
 
-The package was renamed from `opencode-openai-codex-auth-multi` to `oc-chatgpt-multi-auth`, which bypasses this check.
+The package was renamed from `opencode-openai-codex-auth-multi` to `oc-chatgpt-multi-auth`, and now to `oc-codex-multi-auth`, which remains the supported package line.
 
 **If you were using the old package:**
 
 Update your `~/.config/opencode/opencode.json`:
 ```json
 {
-  "plugin": ["oc-chatgpt-multi-auth"]
+  "plugin": ["oc-codex-multi-auth"]
 }
 ```
 
-**Tracking:** [Issue #11](https://github.com/ndycode/oc-chatgpt-multi-auth/issues/11)
+**Tracking:** [Issue #11](https://github.com/ndycode/oc-codex-multi-auth/issues/11)
 
 </details>
 
@@ -77,10 +77,10 @@ Update your `~/.config/opencode/opencode.json`:
 1. **Verify config path and plugin list**:
    - Global: `~/.config/opencode/opencode.json`
    - Project: `./.opencode.json`
-   - Entry should include: `"plugin": ["oc-chatgpt-multi-auth"]`
+   - Entry should include: `"plugin": ["oc-codex-multi-auth"]`
 2. **Confirm plugin cache location** (npm plugins are cached, not stored in `~/.opencode/plugins/`):
    ```bash
-   ls ~/.cache/opencode/node_modules/oc-chatgpt-multi-auth
+   ls ~/.cache/opencode/node_modules/oc-codex-multi-auth
    ```
 3. **Remember: request logs only appear after the first OpenAI request**:
    ```bash
@@ -88,9 +88,9 @@ Update your `~/.config/opencode/opencode.json`:
    ```
 4. **Check registry access**:
    ```bash
-   npm view oc-chatgpt-multi-auth version
+   npm view oc-codex-multi-auth version
    ```
-5. **If the plugin is present but still won’t load**, rerun `npx -y oc-chatgpt-multi-auth@latest` so the installer refreshes the config and clears OpenCode's cached plugin copy.
+5. **If the plugin is present but still won’t load**, rerun `npx -y oc-codex-multi-auth@latest` so the installer refreshes the config and clears OpenCode's cached plugin copy.
 
 </details>
 
@@ -182,8 +182,8 @@ Failed to access Codex API
 
 1. **Manual URL paste:**
    - Re-run `opencode auth login`
-   - Select **"ChatGPT Plus/Pro MULTI (Device Code)"** first if you are on SSH, WSL, or a headless machine
-   - If device code is unavailable, fall back to **"ChatGPT Plus/Pro MULTI (Manual URL Paste)"**
+   - Select **"Codex OAuth (Device Code)"** first if you are on SSH, WSL, or a headless machine
+   - If device code is unavailable, fall back to **"Codex OAuth (Manual URL Paste)"**
    - Paste the full redirect URL after login when using the manual flow
 
 2. **Check port 1455 availability:**
@@ -236,7 +236,7 @@ Failed to access Codex API
 **Cause:** The plugin is using the wrong workspace/account id (personal vs business).
 
 **Solutions:**
-1. Upgrade to the current release of `oc-chatgpt-multi-auth` (workspace routing logic was hardened for Business + Personal dual accounts in the 5.x line).
+1. Upgrade to the current release of `oc-codex-multi-auth` (workspace routing logic was hardened for Business + Personal dual accounts in the 5.x line and renamed in 6.0.0).
 2. Re-run `opencode auth login` and select the correct workspace when prompted.
 3. If running non-interactively, set `CODEX_AUTH_ACCOUNT_ID` to the workspace account id and re-login.
 4. Verify the workspace has Codex access in the ChatGPT UI.
@@ -261,9 +261,9 @@ Failed to access Codex API
    opencode auth login
    ```
 2. Check account storage health (global and project-scoped):
-   - `~/.opencode/openai-codex-accounts.json`
-   - `~/.opencode/projects/<project-key>/openai-codex-accounts.json`
-   - `~/.opencode/openai-codex-flagged-accounts.json`
+   - `~/.opencode/oc-codex-multi-auth-accounts.json`
+   - `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json`
+   - `~/.opencode/oc-codex-multi-auth-flagged-accounts.json`
 3. Remove obviously stale/duplicate entries and keep only verified accounts.
 4. Re-run with logging and inspect per-account failures:
    ```bash
@@ -417,7 +417,7 @@ Items are not persisted when `store` is set to false.
 
 **Solution:**
 ```bash
-npx -y oc-chatgpt-multi-auth@latest
+npx -y oc-codex-multi-auth@latest
 opencode
 ```
 
@@ -686,7 +686,7 @@ cat ~/.opencode/logs/codex-plugin/request-*-after-transform.json | jq '{
    - Config file (redact sensitive info)
 
 3. **Check existing issues:**
-   [GitHub Issues](https://github.com/ndycode/oc-chatgpt-multi-auth/issues)
+   [GitHub Issues](https://github.com/ndycode/oc-codex-multi-auth/issues)
 
 ### Reporting Bugs
 
diff --git a/test/README.md b/test/README.md
index 8448b137..27e3c369 100644
--- a/test/README.md
+++ b/test/README.md
@@ -1,6 +1,6 @@
 # Test Suite
 
-This directory contains the Vitest suites for `oc-chatgpt-multi-auth`.
+This directory contains the Vitest suites for `oc-codex-multi-auth`.
 
 ## Test Structure
 
