Repository navigation
fix(setup): load the upgrade hook in Codex - #1836
Merged
Merged
Conversation
Codex never ran magpie-setup's session-start upgrade check. With no Codex manifest, Codex read the plugin's hooks/hooks.json, whose `$schema` and `modules` keys (Claude Code mods) its strict hooks-file schema rejects, so no hook loaded and every start logged a parse warning; magpie-utilities hit the same warning. The root .codex-plugin hook #1829 re-pointed lacked the inline `hooks` wrapper, so Codex ignored it, and no catalogue installs the root plugin. - magpie-setup and magpie-utilities get a complete .codex-plugin/plugin.json pointing at a clean hooks/codex-hooks.json; magpie-setup's runs check-upgrade.sh as `/bin/bash -p` on startup, magpie-utilities' is empty. - The root manifest's hook is removed. - check-family-plugins generates and pins both files and fails any Codex-catalogued plugin whose Codex-visible hooks file has keys other than `description` and `hooks`. - The session-hook tests cover the Codex wiring; the marketplace docs describe it and Codex's /hooks trust step; uninstall names Codex's real `plugin remove` verb. Checked live with codex 0.154.0's app-server `hooks/list`: the hook loads from codex-hooks.json with no warnings, untrusted until reviewed. Generated-by: Claude Opus 5
potiuk
added a commit
that referenced
this pull request
Oct 28, 2026
* docs(spec-loop): sync specs with contributed functionality Back-fill the specs for the 46 commits since the last sync that changed behaviour without touching a spec: the public-surface scrub mod (#1676), adapter hardening (#1862), the hook managers with install strategy `none` (#1838), Linux `allowAllUnixSockets` and its socket cover (#1809), the touch-overlay dismissal and matcher (#1832, #1833), the per-family Codex manifests (#1836), Vulnogram reviewer comments (#1840), the verify false-pass fixes (#1808), gateway refusal hints (#1810), adversarial-review output and agy fixes (#1852, #1854, #1871), and code-review inline comment text (#1853). Also correct drift found on the way: the threat-model pointer now names Appendix B after the #1859 restructure, the troubleshooting catalogue has fourteen entries, and the overview's Mentoring and Pairing skill counts match docs/modes.md. Generated-by: Claude Opus 5 * docs(marketplace): magpie-security ships its own Codex manifest too #1676 gave magpie-security a .codex-plugin/plugin.json and an empty hooks/codex-hooks.json, because its hooks.json now carries a Claude Code mod, but the "Which manifest Codex reads" table and the Hooks paragraph still named only magpie-setup and magpie-utilities. Generated-by: Claude Opus 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex never ran
magpie-setup's session-start upgrade check, so Codex users were never told that Magpie had changed.Why
plugins/magpie-setup/had no Codex manifest, so Codex read itshooks/hooks.json.$schemaandmoduleskeys are for Claude Code mods, and Codex's strict hooks-file schema (HooksFile,deny_unknown_fields) rejects them. No hook loaded, and every start logged a parse warning.magpie-utilitiesproduced the same warning..codex-plugin/plugin.jsonhook re-pointed in fix: correct drift found by the spec sync; setup welcome, Subversion layer, Codex hook #1829 lacked the inlinehookswrapper, so Codex ignored it. The root plugin is also not in the Codex catalogue.Fix
magpie-setupandmagpie-utilitiesget a complete.codex-plugin/plugin.jsonthat points at a cleanhooks/codex-hooks.json. Codex prefers that manifest over.claude-plugin/, and Claude Code ignores it.magpie-setup's hook runs/bin/bash -p "${PLUGIN_ROOT}/hooks/check-upgrade.sh"onstartup.magpie-utilities's hook file is empty.check-family-plugins.pydescriptionandhooks, which catches this class of bug;CODEX_HOOKScheck.test_session_hook.pynow covers the Codex wiring too: the/bin/bash -pform, and abashonPATHis never run.docs/setup/marketplace.mdand thecheck-upgrade.shheader describe the wiring, and that Codex runs a plugin hook only after the user reviews and trusts it in/hooks.setup uninstallnames Codex's real verb,codex plugin remove <plugin>@apache-magpie.Checks
hooks/list:unknown field `$schema`warnings;sessionStarthook fromcodex-hooks.json, no warnings, untrusted until reviewed.magpie-setuphook in/hooks, start a new session, and look for the Magpie upgrade notice.check-family-plugins.py, thetools/devand setup-preflight tests,claude plugin validate --stricton both plugins, andprek run --all-filespass. The exception is 3 vetted-ops tests that fail only inside the agent sandbox; the commit hook ran them outside it.The pending spec-sync PR records this as a known gap; the next sync will drop it.
Generative AI disclosure: drafted with Claude Code (Claude Opus 5) and reviewed by the committer.
🤖 Generated with Claude Code