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

Resolved 💬 3 comments Opened Mar 27, 2026 by zhexulong Closed Mar 27, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #15294
  • #15311
  • #14754

Powered by Codex Action

etraut-openai contributor · 5 months ago

Please upvote #14754

zhexulong · 5 months ago
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?