Skip to content

Support native PowerShell PreToolUse hooks (not just Bash-wrapped pwsh/powershell commands) #16007

Closed as duplicate

Description

@zhexulong

What variant of Codex are you using?

CLI

What feature would you like to see?

Please expose a native PowerShell tool target in Codex PreToolUse hooks so hook/plugin authors can block dangerous PowerShell commands directly, instead of only handling pwsh -Command ... when it is routed through Bash.

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    on Mar 27, 2026
  2. etraut-openai commented on Mar 27, 2026

    @etraut-openai
    Contributor

    Please upvote #14754

  3. zhexulong commented on Mar 27, 2026

    @zhexulong
    Author

    Please upvote #14754 请点赞 #14754

    OMG, this PR is doing almost the exact same thing as me.

    https://github.com/zhexulong/codex-safeguard

    But I filed this issue hoping for native PowerShell PreToolUse hooks, so that I can develop my plugin better.

    So could you please reopen this issue?

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

    CLIIssues related to the Codex CLIenhancementNew feature or requestwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions