EveryInc/compound-engineering-plugin · error · Error

The Codex plugin manifest does not point at this repository'

Error message

The Codex plugin manifest does not point at this repository's skills directory

What it means

The library reads the skills field from .codex-plugin/plugin.json and requires it to be a string that resolves (via path.resolve against the repo root) exactly to <repoRoot>/skills. Otherwise it throws this error, because local skill mode symlinks that directory and cannot operate if the manifest points anywhere else.

Source

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

    return JSON.parse(await fs.readFile(filePath, "utf8")) as Record<string, unknown>
  } catch (error) {
    throw new Error(`Could not read ${filePath}: ${error instanceof Error ? error.message : String(error)}`)
  }
}

async function assertCompoundEngineeringRepo(repoRoot: string): Promise<void> {
  const packageJson = await readJson(path.join(repoRoot, "package.json"))
  if (packageJson.name !== "compound-engineering") {
    throw new Error(`${repoRoot} is not the compound-engineering repository`)
  }
  const pluginJson = await readJson(path.join(repoRoot, ".codex-plugin", "plugin.json"))
  if (pluginJson.name !== "compound-engineering") {
    throw new Error(`${repoRoot} is not the compound-engineering repository`)
  }

  const skills = pluginJson.skills
  if (typeof skills !== "string" || path.resolve(repoRoot, skills) !== path.join(repoRoot, "skills")) {
    throw new Error("The Codex plugin manifest does not point at this repository's skills directory")
  }

  const unsupported = ["apps", "hooks", "mcpServers"].filter((key) => pluginJson[key] !== undefined)
  if (unsupported.length > 0) {
    throw new Error(
      `Local skill mode cannot represent Codex runtime components: ${unsupported.join(", ")}. Update the developer workflow before using it.`,
    )
  }

  try {
    const defaultHooks = await fs.stat(path.join(repoRoot, "hooks", "hooks.json"))
    if (defaultHooks.isFile()) {
      throw new Error(
        "Local skill mode cannot represent default Codex hooks at hooks/hooks.json. Update the developer workflow before using it.",
      )
    }
  } catch (error) {
    if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error

View on GitHub (pinned to c9c10f8c75)

Solutions

  1. Check the manifest: jq .skills .codex-plugin/plugin.json — it should be "skills".
  2. git restore .codex-plugin/plugin.json if you changed it for an experiment.
  3. If you genuinely moved the skills directory, move it back to <repoRoot>/skills rather than editing the manifest for local dev mode.

Example fix

// before: .codex-plugin/plugin.json
{ "name": "compound-engineering", "skills": "./src/skills" }
// after
{ "name": "compound-engineering", "skills": "skills" }
Defensive patterns

Strategy: validation

Validate before calling

import { readFile } from "node:fs/promises"
import path from "node:path"
const m = JSON.parse(await readFile(".codex-plugin/plugin.json", "utf8"))
if (typeof m.skills !== "string" || path.resolve(m.skills) !== path.resolve("skills")) {
  throw new Error("plugin.json skills must be \"skills\" for local dev mode")
}

Type guard

function pointsAtSkillsDir(m: { skills?: unknown }): m is { skills: string } {
  return typeof m.skills === "string"
}

Try / catch

try {
  await activateLocalCollection(ctx)
} catch (error) {
  if ((error as Error).message.includes("does not point at this repository's skills directory")) {
    console.error("Restore the manifest: git restore .codex-plugin/plugin.json")
  } else throw error
}

Prevention

When it happens

Trigger: plugin.json has no skills field, skills is not a string (e.g. an object/array), or path.resolve(repoRoot, skills) !== path.join(repoRoot, "skills") — e.g. skills: "./src/skills" or a path with ../ traversal (src/dev/codex-dev.ts:135).

Common situations: Experimenting with a relocated skills directory and updating the manifest locally; a manifest authored for a different layout; copying a manifest from another plugin that stores skills elsewhere.

Related errors


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