From bfa3e4137a287602ff7c928e5d4ed99ab1d5e9dd Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 22 Jun 2026 11:14:09 -0700 Subject: [PATCH] Keep Codex hooks manifest in plugin metadata Prompt: Jesse questioned whether the PR should remove the hooks config from the Codex plugin manifest. Runtime investigation showed Codex accepts a committed plugin manifest with hooks and installs the plugin successfully. Removing the field changes behavior: Codex falls back to the default hooks/hooks.json, which uses the non-Codex session-start hook and CLAUDE_PLUGIN_ROOT path, instead of hooks/hooks-codex.json and the session-start-codex script. Changes: restore .codex-plugin/plugin.json hooks to ./hooks/hooks-codex.json and update the Codex marketplace manifest test to require that Codex-specific hook pointer instead of rejecting hooks. Validation: bash tests/codex/test-marketplace-manifest.sh; scripts/lint-shell.sh tests/codex/test-marketplace-manifest.sh; bash tests/codex-plugin-sync/test-sync-to-codex-plugin.sh; bash tests/kimi/test-plugin-manifest.sh; bash tests/shell-lint/test-lint-shell.sh. --- .codex-plugin/plugin.json | 1 + tests/codex/test-marketplace-manifest.sh | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index c98b525f..7f8ae7b6 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -21,6 +21,7 @@ "workflow" ], "skills": "./skills/", + "hooks": "./hooks/hooks-codex.json", "interface": { "displayName": "Superpowers", "shortDescription": "Planning, TDD, debugging, and delivery workflows for coding agents", diff --git a/tests/codex/test-marketplace-manifest.sh b/tests/codex/test-marketplace-manifest.sh index 486cb301..c7093f6b 100755 --- a/tests/codex/test-marketplace-manifest.sh +++ b/tests/codex/test-marketplace-manifest.sh @@ -51,16 +51,11 @@ if not plugin_manifest.exists(): manifest = json.loads(plugin_manifest.read_text(encoding="utf-8")) assert_equal(manifest.get("name"), plugin.get("name"), "plugin manifest name") - -unsupported_manifest_fields = ["hooks"] -present_unsupported = sorted( - field for field in unsupported_manifest_fields if field in manifest +assert_equal( + manifest.get("hooks"), + "./hooks/hooks-codex.json", + "Codex hooks manifest", ) -if present_unsupported: - raise AssertionError( - "unsupported Codex manifest fields present: " - + ", ".join(present_unsupported) - ) print("Codex marketplace manifest looks good") PY