stablyai/orca · warning · Error
The Codex account credentials for this session are temporari
Error message
The Codex account credentials for this session are temporarily unavailable. Try opening the terminal again.
What it means
Thrown by resolveCodexHomeAfterManagedAuthReadiness when a session-scoped requiredCodexHomePath is supplied but the currently selectedCodexHomePath does not match it (compared via codexHomePathsEqual, which normalizes path separators). The 'session' phrasing indicates the resume is bound to specific credentials that the active selection cannot honor — so resuming would silently start under a different account.
Source
Thrown at src/main/ipc/pty.ts:1315
type ManagedCodexAuthResolutionArgs = {
selectedCodexHomePath: string | null
getSettings: () => GlobalSettings | undefined
requiredCodexHomePath?: string
target: CodexAccountSelectionTarget
resolveCurrent: () => string | null
resolveAfterUnavailable: (unavailableManagedHomePath: string) => string | null
}
export function resolveCodexHomeAfterManagedAuthReadiness(
args: ManagedCodexAuthResolutionArgs
): string | null | Promise<string | null> {
const selectedCodexHomePath = args.selectedCodexHomePath
if (
args.requiredCodexHomePath &&
!codexHomePathsEqual(selectedCodexHomePath, args.requiredCodexHomePath)
) {
throw new Error(CODEX_RESUME_AUTH_UNAVAILABLE_MESSAGE)
}
const readiness = waitForManagedCodexAuthReady({
codexHomePath: selectedCodexHomePath,
settings: args.getSettings(),
target: args.target
})
return readiness
? continueCodexHomeAfterManagedAuthWait(args, selectedCodexHomePath, readiness)
: selectedCodexHomePath
}
async function continueCodexHomeAfterManagedAuthWait(
args: ManagedCodexAuthResolutionArgs,
initialCodexHomePath: string | null,
initialReadiness: Promise<boolean>
): Promise<string | null> {
let selectedCodexHomePath = initialCodexHomePath
let readiness = initialReadinessView on GitHub (pinned to 1136503c6a)
Solutions
- Open the terminal again and pick the managed Codex account whose home matches the session's requiredCodexHomePath.
- If the original account is gone, start a fresh Codex session instead of resuming — the resume is intentionally rejected to avoid running under the wrong identity.
- Check Settings > Codex managed accounts to confirm the expected managedHomePath still exists and is selected.
- Verify path normalization isn't causing a false mismatch (trailing slash, Windows vs POSIX separators on WSL).
Defensive patterns
Strategy: validation
Validate before calling
import { normalizeRuntimePathForComparison } from '../../shared/cross-platform-path'
function codexHomeMatchesRequired(selected: string | null, required: string | undefined): boolean {
if (!required) return true
return normalizeRuntimePathForComparison(selected) === normalizeRuntimePathForComparison(required)
}
// before resume
if (!codexHomeMatchesRequired(currentSelection, session.requiredCodexHomePath)) {
promptUserToSelectAccountForSession(session.id)
} Type guard
function isCodexAuthUnavailableMessage(err: unknown): boolean {
return err instanceof Error && err.message.startsWith('The Codex account credentials for this session')
} Try / catch
try {
await resolveCodexHomeAfterManagedAuthReadiness(args)
} catch (err) {
if (err instanceof Error && err.message.startsWith('The Codex account credentials for this session')) {
// transient; surface 'try again' UI, do not flag as a hard failure
return { kind: 'retry' }
}
throw err
} Prevention
- Do not switch the managed Codex account selection while a session resume is in flight.
- Persist the session's requiredCodexHomePath and pre-validate the current selection against it before invoking resume.
- Use normalizeRuntimePathForComparison for any path equality check to avoid trailing-slash/separator false mismatches.
When it happens
Trigger: Resuming a persisted Codex session whose auth.json lives under home A, while the user has since switched the active managed Codex account to home B. Concretely: args.requiredCodexHomePath is set AND !codexHomePathsEqual(selectedCodexHomePath, requiredCodexHomePath).
Common situations: Account switch between the session being saved and reopened; managed-home path changed by settings sync; WSL/host home directory moved; multi-account setups where the dropdown selection drifts from the persisted session.
Related errors
- The selected Codex account credentials are temporarily unava
- A Claude account switch is in progress. Try again after it f
- This Claude launch defines explicit Anthropic auth environme
- token is required
- GitHub request failed ${res.status} ${res.statusText}: ${bod
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/f6e4a1c46135854c.
Report an issue: GitHub.