Skip to content

codex-plugin: bundle lifecycle hooks#401

Draft
tenfyzhong wants to merge 1 commit into
mem9-ai:mainfrom
tenfyzhong:agent/use-plugin-bundled-codex-hooks
Draft

codex-plugin: bundle lifecycle hooks#401
tenfyzhong wants to merge 1 commit into
mem9-ai:mainfrom
tenfyzhong:agent/use-plugin-bundled-codex-hooks

Conversation

@tenfyzhong

Copy link
Copy Markdown

Summary

  • move Codex lifecycle hook configuration into codex-plugin/hooks/hooks.json
  • invoke hook runtimes from the installed plugin through PLUGIN_ROOT
  • stop setup from modifying global Codex hook files or installing hook shims
  • retain explicit cleanup for legacy global hook artifacts and update documentation and tests

Why

Codex plugins can bundle lifecycle hooks directly. Writing mem9 hooks into $CODEX_HOME/hooks.json, toggling hook flags in $CODEX_HOME/config.toml, and copying shims into $CODEX_HOME/mem9/hooks/ leaks plugin behavior into global user configuration and can leave stale or duplicate hooks.

The plugin-owned hook configuration now follows the Codex plugin lifecycle, while setup leaves global Codex hook configuration untouched.

Closes #400

Validation

  • pnpm --dir codex-plugin test (157 tests)
  • pnpm --dir codex-plugin typecheck
  • npm pack --dry-run --json from codex-plugin/
  • git diff --check
  • repository pre-commit and DCO hooks

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.

[Enhancement] Codex plugin should not modify global hook configuration

1 participant