thedotmack/claude-mem · error · Error

Codex CLI ${version} is too old for plugin marketplace suppo

Error message

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

What it means

assertCodexMarketplaceSupported() runs `codex --version`, extracts the semver, and compares it against MIN_CODEX_MARKETPLACE_VERSION (0.128.0) using localeCompare with numeric ordering. If the installed Codex CLI is older, it throws because plugin-marketplace support did not exist in that version. Unparseable or undeterminable versions only warn and continue; only an explicit too-old version throws.

Source

Thrown at src/services/integrations/CodexCliInstaller.ts:326

  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>';
  const endTag = '</claude-mem-context>';

  try {
    readAndStripContextTags(startTag, endTag);
    return true;
  } catch (error) {
    const message = error instanceof Error ? error.message : String(error);
    logger.warn('WORKER', 'Failed to clean AGENTS.md context', { error: message });
    return false;
  }
}

View on GitHub (pinned to d768ba3643)

Solutions

  1. Update Codex CLI to 0.128.0 or newer using its official install/upgrade path.
  2. Verify the resolved version with `codex --version` and, if multiple are installed, adjust PATH so the newer one wins.
  3. Re-run `npx claude-mem@latest install` after the upgrade.

Example fix

# before
codex --version   # codex 0.120.0
npx claude-mem@latest install --codex  # throws

# after — upgrade codex, then reinstall
# (use codex's official upgrade command)
codex --version   # codex 0.128.0
npx claude-mem@latest install --codex
Defensive patterns

Strategy: validation

Validate before calling

import { execFileSync } from 'child_process';

const MIN = '0.128.0';
function codexVersionSupported(): boolean {
  try {
    const out = execFileSync('codex', ['--version'], { encoding: 'utf-8' });
    const v = out.match(/\d+\.\d+\.\d+/)?.[0];
    return !!v && v.localeCompare(MIN, undefined, { numeric: true }) >= 0;
  } catch { return false; }
}

Type guard

function isCodexTooOld(e: unknown): boolean {
  return e instanceof Error && /Codex CLI .* is too old/i.test(e.message);
}

Try / catch

try {
  assertCodexMarketplaceSupported();
} catch (e) {
  if (e instanceof Error && /too old/i.test(e.message)) {
    console.error('Update Codex CLI to 0.128.0+ then re-run: npx claude-mem@latest install');
    process.exit(1);
  }
  throw e;
}

Prevention

When it happens

Trigger: The Codex CLI on PATH reports a version strictly less than 0.128.0 (e.g. 0.120.0). The installer is about to register/use the plugin marketplace feature, which requires the newer codex.

Common situations: An old Codex CLI is installed and on PATH; a package manager pinned codex to an older release; the user upgraded claude-mem but not codex; multiple codex binaries and the older one resolves first on PATH.

Related errors


AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12). Data as JSON: /api/errors/aaf664cf5f2f6fee. Report an issue: GitHub.