can1357/oh-my-pi · error
No Codex OAuth credentials found. Login with 'omp /login ope
Error message
No Codex OAuth credentials found. Login with 'omp /login openai-codex' to enable Codex web search.
What it means
On the default (official endpoint) path, searchCodex calls findCodexAuth to locate Codex OAuth credentials in AuthStorage. If no seed credential exists, it throws a plain Error instructing the user to run `omp /login openai-codex`. The provider requires ChatGPT OAuth to authenticate Codex web search and cannot proceed anonymously.
Source
Thrown at packages/coding-agent/src/web/search/providers/codex.ts:796
keyOrResolver,
accessToken =>
runCodexSearchCandidates({
auth: { accessToken },
params,
query,
modelCandidates,
modelWasConfigured: configuredModel !== undefined,
transport,
}),
{
signal: params.signal,
missingKeyMessage: 'Codex credentials not found. Configure an API key for provider "openai-codex".',
},
);
} else {
const seed = await findCodexAuth(params.authStorage, params.sessionId, params.signal);
if (!seed) {
throw new Error(
"No Codex OAuth credentials found. Login with 'omp /login openai-codex' to enable Codex web search.",
);
}
result = await withOAuthAccess(
params.authStorage,
"openai-codex",
access => {
// A refreshed/rotated credential can carry a different bearer and
// ChatGPT account id than the seed used to select the first attempt.
const accountId = access.accountId ?? getCodexAccountId(access.accessToken);
if (!accountId) {
throw new Error("Codex OAuth credential is missing a ChatGPT account id");
}
return runCodexSearchCandidates({
auth: { accessToken: access.accessToken, accountId },
params,
query,View on GitHub (pinned to 9690622007)
Solutions
- Run `omp /login openai-codex` to store ChatGPT OAuth credentials.
- Check that auth storage exists and is readable (correct HOME / OMP config dir) in the environment running the search.
- Configure an API key / custom endpoint path instead if OAuth login is not possible (note the custom-endpoint OAuth refusal).
- Use a different search provider that supports API keys (Brave, Tavily, Exa, Kagi).
Example fix
// before // CI runs codex search with no credentials Error: No Codex OAuth credentials found... // after # one-time setup in the environment $ omp /login openai-codex $ omp web-search --provider codex "query"
Defensive patterns
Strategy: validation
Validate before calling
const seed = await findCodexAuth(authStorage, sessionId);
if (!seed) {
throw new Error("Run 'omp /login openai-codex' before using Codex web search");
} Try / catch
try {
return await searchCodex(params);
} catch (e) {
if (e instanceof Error && e.message.includes("omp /login openai-codex")) {
return searchWithApiKeyProvider(params); // e.g. tavily/brave
}
throw e;
} Prevention
- Run `omp /login openai-codex` during environment provisioning.
- Verify auth storage presence in CI images before enabling the codex provider.
- Keep API-key providers configured as fallback for non-logged-in environments.
When it happens
Trigger: No custom endpoint is configured, findCodexAuth(params.authStorage, sessionId, signal) returns null — i.e. no openai-codex OAuth entry in auth storage for this session — and searchCodex is invoked (e.g. via the provider chain).
Common situations: Fresh install or CI container without prior login; auth storage cleared or on a different HOME; expired credentials removed by refresh logic; running Codex search before ever running the login command.
Related errors
- Refusing to send official Codex OAuth credentials to custom
- Codex OAuth credential is missing a ChatGPT account id
- Antigravity credentials missing projectId
- Google Cloud credentials missing projectId
- credentials ${usernameKey} and ${passwordKey} must be config
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/1ddb51c61d540637.
Report an issue: GitHub.