Skip to content

Fix invalid Codex hooks configuration - #73

Open
shuto-S wants to merge 2 commits into
OpenWonderLabs:mainfrom
shuto-S:agent/fix-codex-hooks-schema
Open

Fix invalid Codex hooks configuration#73
shuto-S wants to merge 2 commits into
OpenWonderLabs:mainfrom
shuto-S:agent/fix-codex-hooks-schema

Conversation

@shuto-S

@shuto-S shuto-S commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • remove the unsupported onInstall hook configuration from both Codex plugin layouts
  • keep CLI and credential setup explicit through switchbot codex setup
  • update regression tests and the pack-install smoke test for the hook-free manifests
  • document the distinct Claude Code and Codex setup strategies in CONTRIBUTING.md

Root cause

Codex hook config accepts description and hooks at the top level. The plugin shipped an onInstall top-level field, so Codex rejected the file with:

unknown field `onInstall`, expected `description` or `hooks`

Codex does not provide an install-time lifecycle event that can safely replace this. Running the setup helper from SessionStart would repeat plugin registration on every session, so this change removes the invalid hook and keeps the existing explicit setup flow.

Validation

  • npm run verify:pre-commit
  • npm run verify:release-gate with isolated CODEX_HOME and npm cache
  • npx markdownlint CONTRIBUTING.md packages/codex-plugin/README.md
  • installed the local marketplace and plugin with Codex CLI 0.146.0 using an isolated CODEX_HOME; switchbot@switchbot loaded without the hook parse warning

@shuto-S
shuto-S marked this pull request as ready for review July 29, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant