Support notify for user approval events
What feature would you like to see?
Currently, Codex only allows the notify configuration to run scripts when a completion finishes. This is useful for post-processing and alerts, but it does not cover all workflows.
A common need is to also trigger notifications when Codex pauses for user approval before performing an action. For example, if Codex requires confirmation to execute a command, it would be valuable to allow notify to run a script at that point. This would let developers implement reminders, custom approval flows, or external alerting systems.
Proposed enhancement:
• Extend notify support to approval events.
• Provide the same context payload available in completion notify, plus any additional metadata about the pending approval.
This would improve automation and usability for teams that want tighter integration between Codex and their external systems.
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
15 Comments
Makes sense, the breath of notifications needs to increase
Relevant PR https://github.com/openai/codex/pull/2973 and issue https://github.com/openai/codex/issues/2961
This is a duplicate of https://github.com/openai/codex/issues/2961, so I'm going to close this and consolidate.
Can we fix this? Is there any solution?
@PanagiotisDrakatos, we generally prioritize feature requests based on community feedback, so if you want to see a feature implemented, please upvote it (i.e. add a thumbs-up reaction).
It would be nice to expand the notifications so that external applications can receive "approval-requested". I'm not sure why it's locked to TUI only.
Hi — to save maintainer time, I worked with Codex to draft this plan below and won’t open a PR without approval. I also have a local PoC that I verified is working.
I can implement a minimal, backward‑compatible change that reuses the existing
notify = [...]hook and emits a new JSON event when Codex pauses for approval. This repo covers CLI/TUI/app‑server only; IDE/web parity would be a follow‑up elsewhere if desired.Proposed payload (full metadata):
I’ll include docs + tests. Is this direction approved? If yes, I can open a PR.
I've implemented this (with codex) on my branch: https://github.com/Mygod/codex/commit/fea275f6897e6bacbf8dc0de3df4f33331d2e718
Quick check on scope before I open a PR: this change would land in CLI/TUI/app‑server only (notify hook + docs/tests). IDE/web parity would need separate work. Is it acceptable to proceed with that scope?
@Mygod, thanks for the offer. We're rethinking how notifications work in Codex, so we're not looking to expand the current mechanism. We'll share our thinking once we're a bit further along.
I'm going to close this in favor of #2109 (Event Hooks). That's the mechanism we plan to use to address this.
Note that if you're using the Codex CLI, we also support the
tui.notificationsmechanism, which was recently extended to supporttui.notification_methodto support a broader range of terminal emulators.Hi @etraut-openai i'm confused:
Is there a different issue tracking that? If not, can you please re-open one of the issues in order to track this functionality?
@Ben-Epstein, which feature are you looking for specifically? The threads you mentioned above cover a bunch of distinct features. Are you looking for TUI-based notifications for end-of-turn events? Approval events? Are you looking for notifications in the IDE Extension? Are you looking for scriptable event hooks of some sort?
Hey @etraut-openai I'm looking for notifications for approval events, same as the title of this issue thread. I don't think they are distinct events, which aligns with your closing of them as duplicates of each other (#6348, #2961, #3247)
@Ben-Epstein, you didn't mention which Codex client you're using. Are you using the TUI? If so, there's already a mechanism in place for surfacing notifications for approval events. You can add a
notifications = trueline in your configuration under the[tui]section. Refer to this documentation for details.@etraut-openai that's helpful, thanks. I think it would be worth sharing that in the relevant closed issues because the path that I took through the issues lead to https://developers.openai.com/codex/hooks which doesn't mention approval-request.
Nonetheless, this solved the immediate need for me and hopefully the others in this thread. Thanks for the quick reply