Skip to content

Support notify for user approval events #3247

Closed as duplicate
Closed as duplicate

Description

@BobbyWang0120

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

Activity

  1. Kingwolf123 commented on Sep 7, 2025

    @Kingwolf123

    Makes sense, the breath of notifications needs to increase

  2. MarkusJLechner commented on Sep 9, 2025

    @MarkusJLechner

    Relevant PR #2973 and issue #2961

  3. etraut-openai commented on Nov 9, 2025

    @etraut-openai
    Contributor

    This is a duplicate of #2961, so I'm going to close this and consolidate.

  4. PanagiotisDrakatos commented on Dec 8, 2025

    @PanagiotisDrakatos

    Can we fix this? Is there any solution?

  5. etraut-openai commented on Dec 8, 2025

    @etraut-openai
    Contributor

    @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).

  6. BowTiedCrocodile commented on Jan 10, 2026

    @BowTiedCrocodile

    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.

  7. Mygod commented on Jan 15, 2026

    @Mygod

    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):

    • type: "approval-requested"
    • approval-kind: "exec" | "apply-patch"
    • thread-id, turn-id, cwd, input-messages, last-assistant-message (when the model has already emitted a message in the current turn; otherwise null because the turn is paused on a tool call)
    • call-id, reason
    • exec: command, proposed_execpolicy_amendment, parsed_cmd
    • apply-patch: changes, grant-root

    I’ll include docs + tests. Is this direction approved? If yes, I can open a PR.

  8. Mygod commented on Jan 16, 2026

    @Mygod

    I've implemented this (with codex) on my branch: Mygod@fea275f

    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?

  9. etraut-openai commented on Jan 16, 2026

    @etraut-openai
    Contributor

    @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.

  10. etraut-openai commented on Jan 31, 2026

    @etraut-openai
    Contributor

    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.notifications mechanism, which was recently extended to support tui.notification_method to support a broader range of terminal emulators.

  11. Ben-Epstein commented on Apr 19, 2026

    @Ben-Epstein

    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?

  12. etraut-openai commented on Apr 19, 2026

    @etraut-openai
    Contributor

    @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?

  13. Ben-Epstein commented on Apr 19, 2026

    @Ben-Epstein

    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)

  14. etraut-openai commented on Apr 19, 2026

    @etraut-openai
    Contributor

    @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 = true line in your configuration under the [tui] section. Refer to this documentation for details.

  15. Ben-Epstein commented on Apr 19, 2026

    @Ben-Epstein

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions