Skip to content

core: add support for user defined event hooks#2904

Closed
bhandras wants to merge 2 commits intoopenai:mainfrom
bhandras:event-hooks
Closed

core: add support for user defined event hooks#2904
bhandras wants to merge 2 commits intoopenai:mainfrom
bhandras:event-hooks

Conversation

@bhandras
Copy link

This PR adds support for user defined event hooks (similar feature to what already exists in Claude Code).

It's an attempted fix for: #2109

See the second commit for usage and example configuration!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@bhandras
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@bhandras
Copy link
Author

recheck

github-actions bot added a commit that referenced this pull request Aug 29, 2025
@bhandras
Copy link
Author

bhandras commented Sep 4, 2025

Rebased on top of latest main branch.

@bhandras
Copy link
Author

bhandras commented Sep 4, 2025

@bolinfest do you see any chance of this landing? Would you mind PTAL?

@bhandras
Copy link
Author

bhandras commented Sep 5, 2025

Rebased on latest main.

@tommyengstrom
Copy link

tommyengstrom commented Sep 8, 2025

Please review this. Hooks are a big deal! Would be great if we could get them in Codex.

@bhandras
Copy link
Author

Ping @bolinfest, could you PTAL? Seems like many are interested in this feature.

@bbss
Copy link

bbss commented Sep 15, 2025

I've been using this PR and it's useful, so thanks. However it does not allow blocking on these actions or controlling flow like claude code hooks do.

@pavelklymenko
Copy link

I've been using this PR and it's useful, so thanks. However it does not allow blocking on these actions or controlling flow like claude code hooks do.

It would be awesome to be able to “facilitate” good behavior 😁

@andrewschreiber
Copy link

Excited for this!

@Djordje-Stojanovic
Copy link

Can't wait for this :)

@bhandras
Copy link
Author

Rebased!

@backnotprop
Copy link

backnotprop commented Sep 28, 2025

However it does not allow blocking on these actions or controlling flow like claude code hooks do.

This is the point, we need this.

@DenisGorbachev
Copy link

However it does not allow blocking on these actions or controlling flow like claude code hooks do.

Agreed, this is very much needed. Currently I'm asking the model to run mise agent:on:stop, which runs the lints and tests.

@kunlongxu
Copy link

I'm looking forward to this feature, hope it can be merged soon.

@backnotprop
Copy link

This is an incomplete and inadequate feature unless blocking and feedback (for the agent) are incorporated.

@svarlamov
Copy link

Would love to see this feature released! Is there anything I could do to help this PR get merged? @bhandras

@etraut-openai
Copy link
Collaborator

Thanks for the contribution, and apologies for the slow response. We've received many PRs, and we don't have the bandwidth on the codex team to review all of them.

We've updated our contribution guidelines to clarify that we're currently accepting contributions for bugs and security fixes, but we're not generally accepting new features at this time. We need to make sure that all new features compose well with both existing and upcoming features and fit into our roadmap. If you would like to propose a new feature, please file or upvote an enhancement request in the issue tracker. We will generally prioritize new features based on community feedback.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
@openai openai unlocked this conversation Oct 30, 2025
@alanhamlett
Copy link

Here's the enhancement request link for a new "hooks" feature:

#2109

youta7 added a commit to youta7/ta-codex that referenced this pull request Nov 10, 2025
@ibehnam
Copy link

ibehnam commented Jan 14, 2026

@etraut-openai This right there is why I'm switching from Codex CLI to OpenCode today. It pains me because Codex is faster (it's Rust!) and I like its simplicity, but hooks are a must in agentic systems. I could live w/o Claude Code's plan/build mode, sub-agents, custom status line, several useful --flags, etc., but hooks are nonnegotiable.

@etraut-openai
Copy link
Collaborator

@ibehnam, if you haven't already done so, please upvote this feature request. Our feature prioritization is generally guided by upvote counts. The hooks feature is getting closer to the top of the priority queue.

@ibehnam
Copy link

ibehnam commented Jan 14, 2026

@etraut-openai Okay I just did!

swordfish444 pushed a commit to swordfish444/codex that referenced this pull request Feb 26, 2026
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.