From 4eecd23ea3ed4f61e1c8c419d7dcc2b4f2ea2a3d Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Tue, 24 Mar 2026 12:46:16 -0700 Subject: [PATCH] fix(codex): use codexHomeDir() fallback for accurate auth detail path When adapter config has no CODEX_HOME but process.env.CODEX_HOME is set, readCodexAuthInfo reads from the process env path. The detail message now uses codexHomeDir() instead of hardcoded "~/.codex" so the displayed path always matches where credentials were read from. Co-Authored-By: Claude Opus 4.6 --- packages/adapters/codex-local/src/server/test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/adapters/codex-local/src/server/test.ts b/packages/adapters/codex-local/src/server/test.ts index 471d6cb17..cf5a183e8 100644 --- a/packages/adapters/codex-local/src/server/test.ts +++ b/packages/adapters/codex-local/src/server/test.ts @@ -15,7 +15,7 @@ import { } from "@paperclipai/adapter-utils/server-utils"; import path from "node:path"; import { parseCodexJsonl } from "./parse.js"; -import { readCodexAuthInfo } from "./quota.js"; +import { codexHomeDir, readCodexAuthInfo } from "./quota.js"; function summarizeStatus(checks: AdapterEnvironmentCheck[]): AdapterEnvironmentTestResult["status"] { if (checks.some((check) => check.level === "error")) return "fail"; @@ -116,7 +116,7 @@ export async function testEnvironment( code: "codex_native_auth_present", level: "info", message: "Codex is authenticated via its own auth configuration.", - detail: codexAuth.email ? `Logged in as ${codexAuth.email}.` : `Credentials found in ${codexHome ?? "~/.codex"}/auth.json.`, + detail: codexAuth.email ? `Logged in as ${codexAuth.email}.` : `Credentials found in ${codexHome ?? codexHomeDir()}/auth.json.`, }); } else { checks.push({