Yeachan-Heo/oh-my-codex · error · Error
catalog_manifest_invalid:agents
Error message
catalog_manifest_invalid:agents
What it means
The sibling of the skills check: validateCatalogManifest requires 'agents' to be an array of agent entries. This error fires when agents is missing, an object, or a non-array value. An empty array is valid at this stage.
Source
Thrown at src/catalog/schema.ts:53
}
function assertNonEmptyString(value: unknown, field: string): asserts value is string {
if (typeof value !== 'string' || value.trim() === '') {
throw new Error(`catalog_manifest_invalid:${field}`);
}
}
export function validateCatalogManifest(input: unknown): CatalogManifest {
if (!isObject(input)) throw new Error('catalog_manifest_invalid:root');
if (typeof input.schemaVersion !== 'number' || !Number.isInteger(input.schemaVersion)) {
throw new Error('catalog_manifest_invalid:schemaVersion');
}
assertNonEmptyString(input.catalogVersion, 'catalogVersion');
if (!Array.isArray(input.skills)) throw new Error('catalog_manifest_invalid:skills');
if (!Array.isArray(input.agents)) throw new Error('catalog_manifest_invalid:agents');
const seenSkills = new Set<string>();
const skills: CatalogSkillEntry[] = input.skills.map((entry, index) => {
if (!isObject(entry)) throw new Error(`catalog_manifest_invalid:skills[${index}]`);
assertNonEmptyString(entry.name, `skills[${index}].name`);
assertNonEmptyString(entry.category, `skills[${index}].category`);
assertNonEmptyString(entry.status, `skills[${index}].status`);
if (!SKILL_CATEGORIES.has(entry.category as CatalogSkillCategory)) {
throw new Error(`catalog_manifest_invalid:skills[${index}].category`);
}
if (!ENTRY_STATUSES.has(entry.status as CatalogEntryStatus)) {
throw new Error(`catalog_manifest_invalid:skills[${index}].status`);
}
const name = entry.name.trim();
if (seenSkills.has(name)) throw new Error(`catalog_manifest_invalid:duplicate_skill:${name}`);
seenSkills.add(name);View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Set agents to an array ([] is acceptable if no agents exist)
- Regenerate the manifest with the official generator
- Validate the built manifest in CI
Example fix
// before (no "agents" key) // after "agents": []
Defensive patterns
Strategy: validation
Validate before calling
if (!Array.isArray(raw.agents)) { raw.agents = raw.agents ?? []; /* or reject */ } Type guard
function hasAgentsArray(v: unknown): v is { agents: unknown[] } { return typeof v === 'object' && v !== null && Array.isArray((v as any).agents); } Prevention
- Always emit "agents": [] even in skill-only catalogs
- Validate built manifests in CI
When it happens
Trigger: A manifest where "agents" is absent or keyed as an object map rather than a list.
Common situations: Skill-only catalogs that omit the agents key entirely, or hand-edits converting lists to maps.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- catalog_manifest_invalid:${field}
- catalog_manifest_invalid:root
- catalog_manifest_invalid:schemaVersion
- catalog_manifest_invalid:skills
- catalog_manifest_invalid:skills[${index}]
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/aadc382d0464b4d5.
Report an issue: GitHub.