EveryInc/compound-engineering-plugin · error · Error

Could not verify the official marketplace-backed Compound En

Error message

Could not verify the official marketplace-backed Compound Engineering plugin

What it means

After switching to remote mode, `switchToRemote()` re-lists installed Compound Engineering plugins and requires exactly one plugin that is the official marketplace-backed one (`isOfficialMarketplacePlugin`). If the count is zero, more than one, or the single plugin is not marketplace-backed, the switch did not produce the expected end state and this error is thrown.

Source

Thrown at src/dev/codex-dev.ts:633

  const collection = await inspectLocalCollection(context)
  if (collection.kind === "collision" || collection.kind === "unrelated" || collection.kind === "broken") {
    throw new Error(`Cannot switch to remote mode while the local collection is ${collection.kind}`)
  }

  await ensureOfficialMarketplace(context, runner)
  const plugins = await listCompoundEngineeringPlugins(context, runner)
  await removePlugins(
    context,
    runner,
    collection.kind === "valid"
      ? plugins
      : plugins.filter((entry) => entry.pluginId !== OFFICIAL_PLUGIN_ID),
  )
  await runCodex(context, runner, ["plugin", "add", OFFICIAL_PLUGIN_ID, "--json"])

  const installed = await listCompoundEngineeringPlugins(context, runner)
  if (installed.length !== 1 || !isOfficialMarketplacePlugin(installed[0]!)) {
    throw new Error("Could not verify the official marketplace-backed Compound Engineering plugin")
  }

  await removeLocalCollection(context)
  const status = await inspectCodexDevStatus(context, runner)
  if (status.mode !== "remote") {
    throw new Error(`Could not verify remote Codex mode (reported ${status.mode})`)
  }
  return status
}

export async function removeCodexDevInstallation(
  context: CodexDevContext,
  runner: CommandRunner = new BunCommandRunner(),
): Promise<CodexDevStatus> {
  const plugins = await listCompoundEngineeringPlugins(context, runner)
  await removeLocalPluginConflicts(context, runner, plugins)
  await removeLocalCollection(context)
  const status = await inspectCodexDevStatus(context, runner)

View on GitHub (pinned to c9c10f8c75)

Solutions

  1. Run `codex:dev -- status` and inspect the plugin list
  2. Run `bun run codex:dev -- remove`, then retry `codex:dev -- remote`
  3. Manually run `codex plugin list --json` to see duplicates and remove extras with `codex plugin remove <id>`
  4. Verify the official marketplace is present and correct (see error 41)

Example fix

// after
await runCodex(context, runner, ["plugin", "list", "--json"]) // inspect duplicates
await removeCodexDevInstallation(context, runner)
await switchToRemote(context, runner)
Defensive patterns

Strategy: try-catch

Validate before calling

const plugins = await listCompoundEngineeringPlugins(context, runner)
if (plugins.length > 1) {
  await removePlugins(context, runner, plugins)
}

Type guard

function hasExactlyOfficial(plugins: InstalledPlugin[]): boolean {
  return plugins.length === 1 && plugins[0]!.marketplaceName === "compound-engineering-plugin"
}

Try / catch

try {
  await switchToRemote(context, runner)
} catch (error) {
  if (String(error).includes("official marketplace-backed")) {
    await removeCodexDevInstallation(context, runner)
    await switchToRemote(context, runner)
  } else throw error
}

Prevention

When it happens

Trigger: Calling `switchToRemote(context, runner)` when `codex plugin add OFFICIAL_PLUGIN_ID --json` silently failed to enable/install, an extra Compound Engineering plugin entry survived removal, or the installed plugin's marketplace name does not match the official marketplace.

Common situations: Codex CLI version with changed `plugin add` semantics; stale disabled plugin entries in config.toml; plugin added from a non-official marketplace name.

Related errors


AI-assisted analysis of EveryInc/compound-engineering-plugin@c9c10f8c75 (2026-08-31). Data as JSON: /api/errors/4f830015b1b4bd75. Report an issue: GitHub.