Skip to content

Event Hooks #2109

Closed
Closed

Description

@aehlke

Let us define event hooks with pattern matching, to trigger scripts/commands before/after codex behaviors.

Activity

  1. backnotprop commented on Sep 2, 2025

    @backnotprop

    Prioritize please 🙏 - hooks in the lifecycle will allow for advanced steering/context-engineering, and enterprise guardrailing. Plus cool community whatever.

  2. andrewschreiber commented on Sep 16, 2025

    @andrewschreiber

    Would encourage the Codex team to follow Claude Code's schema!

    https://docs.claude.com/en/docs/claude-code/hooks

  3. nikhil-pandey commented on Oct 9, 2025

    @nikhil-pandey

    +1

  4. fullofcaffeine commented on Oct 13, 2025

    @fullofcaffeine

    +1000, I'm really missing this from CC.

  5. backnotprop commented on Oct 17, 2025

    @backnotprop

    Claude Code and Cursor both support blocking + feedback providing hooks.

    This will prove to be an integral feature for harnesses... looking forward to Codex's implementation.

  6. changed the title [-]Request: Event Hooks[/-] [+]Event Hooks[/+] on Nov 12, 2025
  7. InakiBes commented on Nov 15, 2025

    @InakiBes

    Please prioritize 🙏 - hooks are very necessary

  8. Thevetat commented on Nov 23, 2025

    @Thevetat

    This is the final feature that will make me throw anthropic in the trash and never look back. You would get so many power users if you add hooks in.

  9. doggy8088 commented on Nov 23, 2025

    @doggy8088

    Indeed, hooks unlock so much potential.

  10. vilnitsky commented on Nov 28, 2025

    @vilnitsky

    Missing this too!

  11. ZeldOcarina commented on Nov 30, 2025

    @ZeldOcarina

    We are badly missing approval requests hooks!!

  12. raine commented on Dec 5, 2025

    @raine

    My use case is that I need to run a script when user submits their prompt, so that I can show in a tmux status bar that an agent is active in that window. Claude can handle this with the UserPromptSubmit hook.

  13. marked Support Hooks #7719 as a duplicate of this issue on Dec 8, 2025
  14. a112121788 commented on Dec 9, 2025

    @a112121788

    My solution: clone this repository and implement the corresponding functionality using Claude; I really can't wait for the official team to add this feature.

  15. 67 remaining items

  16. eternal-openai commented on Mar 20, 2026

    @eternal-openai
    Contributor

    Coming up soon @ksdf7235 ! It's all still experimental, but shaping up fast

  17. etraut-openai commented on Mar 27, 2026

    @etraut-openai
    Contributor

    Event hooks are now available as an experimental feature. Refer to this documentation for details.

  18. ofek commented on Mar 27, 2026

    @ofek

    @etraut-openai Why is Windows support temporarily disabled?

  19. added a commit that references this issue on Mar 27, 2026
  20. 3Spiders commented on Mar 27, 2026

    @3Spiders

    do you have a plan to support "Edit|Write" matcher in PostToolUse、PreToolUse ? i think plenty of feature relies on this
    @etraut-openai

  21. YSAA1 commented on Apr 2, 2026

    @YSAA1

    补充一条建议:在现有 Hooks 体系中新增 PreCompact 生命周期事件(或 BeforeCompact),触发于手动/自动 compaction 前。建议包含 reason(manual/auto)、total_usage_tokens_before_compaction、auto_compact_limit、session_id/thread_id/turn_id、cwd、可选 recent_rollup_summary,并支持失败策略 on_error: continue|abort 与可选 decision 返回(continue/abort)。这个可以直接承接之前 #12208 的诉求。

  22. added
    hooksIssues related to event hooks
    and removed
    agentIssues related to the core agent loop
    on Apr 2, 2026
  23. added a commit that references this issue on Apr 5, 2026
  24. 3Spiders commented on Apr 16, 2026

    @3Spiders

    do you have a plan to support "Edit|Write" matcher in PostToolUse、PreToolUse ? i think plenty of feature relies on this @etraut-openai

    @etraut-openai May I ask about the progress of this?

  25. am-will commented on Apr 16, 2026

    @am-will

    do you have a plan to support "Edit|Write" matcher in PostToolUse、PreToolUse ? i think plenty of feature relies on this @etraut-openai

    please and thank you. i have many hooks i can't even use because of this

  26. etraut-openai commented on Apr 16, 2026

    @etraut-openai
    Contributor

    I'm going to lock this thread since it's now closed. If you'd like to report bugs or request additional extensions to the Event Hooks feature, please open new issues.

  27. locked as resolved and limited conversation to collaborators on Apr 16, 2026
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 requesthooksIssues related to event hooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions