thedotmack/claude-mem · warning
Could not determine Codex CLI version. Continuing; plugin
Error message
Could not determine Codex CLI version. Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer. What it means
Before touching the Codex marketplace, `assertCodexMarketplaceSupported` runs `codex --version` via spawnSync. A spawn error is rethrown, but a non-zero exit only warns and continues — the installer cannot confirm the CLI meets MIN_CODEX_MARKETPLACE_VERSION, so later marketplace commands may still fail on a genuinely old CLI.
Source
Thrown at src/services/integrations/CodexCliInstaller.ts:315
function disableCodexPluginConfig(): void {
const changed = writeCodexPluginConfig(false);
console.log(` Disabled Codex plugin: ${CODEX_PLUGIN_ID}${changed ? '' : ' (already disabled)'}`);
}
function extractSemver(value: string): string | null {
return value.match(/\d+\.\d+\.\d+/)?.[0] ?? null;
}
function assertCodexMarketplaceSupported(): void {
const result = codexSpawn(['--version']);
const output = `${result.stdout ?? ''}\n${result.stderr ?? ''}`.trim();
if (result.error) {
throw result.error;
}
if (result.status !== 0) {
console.warn(` Could not determine Codex CLI version. Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer.${output ? `\n${output}` : ''}`);
return;
}
const version = extractSemver(output);
if (!version) {
console.warn(` Could not parse Codex CLI version from "${output || '<empty>'}". Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer.`);
return;
}
if (version.localeCompare(MIN_CODEX_MARKETPLACE_VERSION, undefined, { numeric: true }) < 0) {
throw new Error(`Codex CLI ${version} is too old for plugin marketplace support. Update Codex CLI to ${MIN_CODEX_MARKETPLACE_VERSION} or newer, then run: npx claude-mem@latest install`);
}
}
function removeCodexAgentsMdContext(): boolean {
if (!existsSync(CODEX_AGENTS_MD_PATH)) return true;
const startTag = '<claude-mem-context>';View on GitHub (pinned to e2d1df569a)
Solutions
- Run `codex --version` yourself and fix the CLI until it exits 0.
- Update Codex CLI to at least the minimum marketplace version named in the message.
- Re-run `npx claude-mem@latest install` once `--version` works.
Defensive patterns
Strategy: validation
Validate before calling
import { spawnSync } from 'node:child_process';
const r = spawnSync('codex', ['--version'], { encoding: 'utf8' });
const version = r.status === 0 ? `${r.stdout}\n${r.stderr}`.match(/\d+\.\d+\.\d+/)?.[0] : null;
if (!version) {
// fix or update the codex CLI before running the installer
} Prevention
- Smoke-test `codex --version` before installing Codex integrations.
- Keep Codex CLI at or above the minimum marketplace-capable version.
When it happens
Trigger: `codex --version` exits non-zero (broken shim, partially installed CLI, runtime error in the binary) while the binary itself spawns without an error object.
Common situations: Corrupted Codex CLI install, PATH pointing at a wrapper script that errors, or a CLI build whose --version subcommand fails.
Related errors
- CLAUDE_CODE_PATH is set to "${settings.CLAUDE_CODE_PATH}" bu
- Could not parse Codex CLI version from "${output || '<empt
- API key prompt cancelled — leaving existing configuration un
- Gateway setup cancelled — leaving existing configuration unt
- Worker failed to start before hook, handler will proceed gra
AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20).
Data as JSON: /api/errors/80721770e6a8b7f8.
Report an issue: GitHub.