thedotmack/claude-mem · warning
Codex marketplace ${MARKETPLACE_NAME} is already registere
Error message
Codex marketplace ${MARKETPLACE_NAME} is already registered from another source; replacing it with ${marketplaceRoot}. What it means
`registerCodexMarketplace` runs `codex plugin marketplace add <root>`. When that fails because MARKETPLACE_NAME is already registered pointing at a different source, the installer warns, runs `codex plugin marketplace remove MARKETPLACE_NAME`, then re-adds from the new root. The warning means the old registration was detected and replaced.
Source
Thrown at src/services/integrations/CodexCliInstaller.ts:180
}
function isMarketplaceDifferentSourceError(error: unknown): boolean {
const message = error instanceof Error ? error.message : String(error);
return message.includes(`marketplace '${MARKETPLACE_NAME}' is already added from a different source`)
|| message.includes(`marketplace \`${MARKETPLACE_NAME}\` is already added from a different source`);
}
function registerCodexMarketplace(marketplaceRoot: string): void {
try {
runCodex(['plugin', 'marketplace', 'add', marketplaceRoot]);
return;
} catch (error) {
if (!isMarketplaceDifferentSourceError(error)) {
throw error instanceof Error ? error : new Error(String(error));
}
}
console.warn(` Codex marketplace ${MARKETPLACE_NAME} is already registered from another source; replacing it with ${marketplaceRoot}.`);
runCodex(['plugin', 'marketplace', 'remove', MARKETPLACE_NAME]);
runCodex(['plugin', 'marketplace', 'add', marketplaceRoot]);
}
export function setTomlBooleanInTable(content: string, header: string, key: string, enabled: boolean): string {
const booleanLine = `${key} = ${enabled ? 'true' : 'false'}`;
const lines = content.split('\n');
const headerIndex = lines.findIndex((line) => line.trim() === header);
if (headerIndex === -1) {
const trimmed = content.trimEnd();
return `${trimmed}${trimmed ? '\n\n' : ''}${header}\n${booleanLine}\n`;
}
let sectionEnd = headerIndex + 1;
while (sectionEnd < lines.length && !/^\s*\[/.test(lines[sectionEnd])) {
sectionEnd += 1;
}View on GitHub (pinned to e2d1df569a)
Solutions
- No action required — the installer removes and re-adds the marketplace automatically.
- Verify afterwards: `codex plugin marketplace list` should show the new root.
- If the warning appears on every install, remove the marketplace manually (`codex plugin marketplace remove claude-mem`) and reinstall.
Defensive patterns
Strategy: fallback
Validate before calling
import { spawnSync } from 'node:child_process';
const list = spawnSync('codex', ['plugin', 'marketplace', 'list'], { encoding: 'utf8' });
const staleRegistration = list.stdout.includes('claude-mem') && !list.stdout.includes(expectedMarketplaceRoot);
if (staleRegistration) {
spawnSync('codex', ['plugin', 'marketplace', 'remove', 'claude-mem']);
} Prevention
- Prefer a single install source (npm or local dev) per machine.
- Remove the marketplace before switching install sources.
When it happens
Trigger: Codex already has the claude-mem marketplace registered from a different path (old install location, moved checkout, different npm cache dir) while a new install registers a new marketplaceRoot.
Common situations: Reinstalling after moving the repo, switching between local dev and npm installs, or npm cache paths changing between Node versions.
Related errors
- [install] Pre-overwrite worker shutdown failed: ${message}
- Codex marketplace root ${resolved} is missing required files
- cloud sync ack conflict for ${body.id} rev ${body.entity_rev
- Failed to locate codex via where; falling back to codex.cmd
- Failed to clean AGENTS.md context
AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20).
Data as JSON: /api/errors/08ec7fc5db89a8ac.
Report an issue: GitHub.