Skip to content

feat(codex): align with official codex marketplace + harness AGENTS.md#54

Merged
em0t merged 1 commit intomainfrom
feat/codex-plugins-marketplace
Apr 21, 2026
Merged

feat(codex): align with official codex marketplace + harness AGENTS.md#54
em0t merged 1 commit intomainfrom
feat/codex-plugins-marketplace

Conversation

@em0t
Copy link
Copy Markdown
Collaborator

@em0t em0t commented Apr 21, 2026

Summary

  • Switch Codex plugin distribution from a hand-rolled ~/.codex/plugins/cache/ setup to the official codex marketplace add taptap/agents-plugins flow on Codex 0.121.0+.
  • Add the missing Codex interface block (displayName / category / capabilities) to all four plugin manifests so they actually appear in the TUI picker.
  • Track .agents/plugins/marketplace.json (Codex marketplace registry); set git and sync to INSTALLED_BY_DEFAULT so adding the marketplace bootstraps the core plugins.
  • Rewrite root AGENTS.md (also exposed as CLAUDE.md via symlink) into a real harness file with sections for repo layout, commands, conventions, plugin contract, and safety rules.

Motivation

In Codex 0.121.0 the TUI silently rejects any plugin manifest missing an interface block. Our four manifests had only name/version/description/author/skills, so git/sync/spec/test were invisible in the picker even after marketplace registration. On top of that, the previous ensure-codex-plugins.sh used the legacy source_type = "local" cache layout, which Codex's plugin manager interprets as nested sub-plugins (it walks into git/skills/ looking for .codex-plugin/plugin.json), producing repeated missing or invalid plugin.json path=...git/skills warnings.

The fix is to stop reinventing the cache and let Codex own it. The official codex marketplace add against this repo on GitHub installs into the correct <marketplace>/<plugin>/<sha>/ layout and honors INSTALLED_BY_DEFAULT.

Scope

  • GitHub workflows / repository automation
  • Marketplace metadata or release flow
  • Plugin implementation
  • Tests or validation scripts
  • Documentation

Validation

  • Local verification completed
  • CI validation expected to pass
  • No runtime verification needed

tests/validate.sh passes (existing checks plus four new ensure-codex-plugins.sh cases and Codex interface schema validation). End-to-end Codex behavior (codex marketplace addINSTALLED_BY_DEFAULT → plugins visible in TUI) was confirmed with the openai-curated reference flow; the same path will work against this repo only after this PR lands on main, since codex marketplace add taptap/agents-plugins requires the new .agents/plugins/marketplace.json to be on the default branch.

Verification steps after merge:

  1. rm -rf ~/.codex/plugins/cache/taptap-plugins ~/.codex/.tmp/app-server-remote-plugin-sync-v1 and remove any pre-existing [marketplaces.taptap-plugins] from ~/.codex/config.toml.
  2. codex marketplace add taptap/agents-pluginscodex exec --skip-git-repo-check 'echo verify'.
  3. Confirm ~/.codex/plugins/cache/taptap-plugins/git/<sha>/ and sync/<sha>/ exist; confirm ~/.codex/log/codex-tui.log no longer reports failed to load plugin: missing or invalid .codex-plugin/plugin.json plugin="git@taptap-plugins".
  4. In Codex TUI, $git shows TapTap Git; $sync shows TapTap Sync.

Regression Risk

  • Downstream repos that ran the previous ensure-codex-plugins.sh still hold the old script under <repo>/.codex/hooks/scripts/. Until they re-run /sync:basic to pick up the new version, their SessionStart hook will keep writing the legacy non-versioned cache layout. Mitigation: documented in CHANGELOG.md; re-running /sync:basic is a one-line fix.
  • Users who manually registered [marketplaces.taptap-plugins] with source_type = "local" need to remove that section so the new script can re-register via the GitHub source. Documented in the cleanup steps above.
  • Concurrent SessionStart invocations can both run codex marketplace add; the second call returns "already added" with exit 0. Harmless but redundant. A flock could be added later if it becomes noisy.

No production runtime is affected by this PR — it only changes how local Codex installations discover the plugins.

AI Disclosure

  • Authoring tools: Claude Code (Opus 4.7, 1M context)
  • Review tools: Claude Code (Opus 4.7) — single-pass review of committed diff against the project checklist; no blocking findings

Checklist

  • The PR title is in English
  • Commit messages are in English
  • I updated docs when behavior or workflow changed
  • I considered versioning rules if plugin files changed

…AGENTS.md

Plugin discovery in Codex 0.121.0 silently rejects manifests without an
`interface` block, so `git`/`sync`/`spec`/`test` were invisible in the
TUI picker. Cache layout for local-source marketplaces also produces
sub-plugin scan errors. Switch to the official `codex marketplace add`
flow against this repo on GitHub.

- Add required Codex `interface` block (displayName, category,
  capabilities) to git/sync/spec/test manifests
- Track `.agents/plugins/marketplace.json` (Codex marketplace registry)
  with INSTALLED_BY_DEFAULT for git+sync core plugins
- Drop blanket `/.agents/plugins/` ignore — Codex 0.121.0 doesn't write
  artifacts there
- Rewrite ensure-codex-plugins.sh to delegate cache to Codex itself:
  call `codex marketplace add taptap/agents-plugins` when missing,
  then mirror project-level enabled plugins to user config. Drop all
  hand-rolled cache symlink and installed_plugins.json maintenance
- Update codex-plugins-config agent to document the new flow
- Replace one validate.sh case with four covering the new behavior +
  add Codex manifest interface schema validation +
  .agents/plugins/marketplace.json schema validation
- Rewrite root AGENTS.md (also CLAUDE.md via symlink) into a proper
  harness file: layout, commands, conventions, plugin contract, safety

Versions: marketplace 0.1.36, git 0.1.16, spec 0.1.8, sync 0.1.28,
test 0.0.6.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added scope:docs Changes documentation or contributor guidance. scope:tests Changes tests or validation coverage. scope:meta Changes repository metadata, agent rules, or local tooling. scope:plugins Changes one or more plugins. scope:git Touches the git plugin. scope:spec Touches the spec plugin. scope:sync Touches the sync plugin. maintainer-review High-risk change that should be reviewed by a repository maintainer. kind:feature Adds a feature or expands behavior. size:xl Very large PR, expect slower review. and removed scope:plugins Changes one or more plugins. scope:docs Changes documentation or contributor guidance. labels Apr 21, 2026
@em0t em0t merged commit 79d5d72 into main Apr 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature Adds a feature or expands behavior. maintainer-review High-risk change that should be reviewed by a repository maintainer. scope:git Touches the git plugin. scope:meta Changes repository metadata, agent rules, or local tooling. scope:spec Touches the spec plugin. scope:sync Touches the sync plugin. scope:tests Changes tests or validation coverage. size:xl Very large PR, expect slower review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant