support skill-scoped hooks#20528
Draft
abhinav-oai wants to merge 1 commit intomainfrom
Draft
Conversation
Bojun-Vvibe
added a commit
to Bojun-Vvibe/oss-contributions
that referenced
this pull request
May 1, 2026
- anomalyco/opencode#25255: doom loop scope+filter-order fix (merge-as-is) - openai/codex#20577: store-history fork migration (merge-after-nits) - openai/codex#20528: skill-scoped hooks feature (merge-after-nits)
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.
Why
Skills can already be distributed inside plugins, but today hooks only come from settings files and plugins. This adds the same frontmatter-based hook model to skills so a skill can carry behavior that only applies while that skill is active.
What
hooksfrom skill frontmatter alongside existing skill metadata.HookSource::Skillacross protocol, analytics, and hook UI surfaces.SessionStarthooks declared by skills with a warning because skills activate after thread start.PreToolUsehooks applying only on the turn where the skill is active.Verification
cargo test -p codex-hookscargo test -p codex-core-skills parses_hooks_from_skill_frontmattercargo test -p codex-core --test all suite::hooks::skill_pre_tool_use_blocks_only_while_skill_is_activecargo test -p codex-app-server-protocolDocumentation
The public skills documentation on developers.openai.com/codex should be updated to describe skill-frontmatter hooks and note that
SessionStartis not meaningful for skills.