Summary
The Codex-native activity hooks added via #3364 can fail repeatedly on Windows because the plugin manifest invokes bare bash and provides no commandWindows override.
Affected lifecycle events can surface:
Hook failed
└ hook exited with code 1
Reproduction
The active inline hooks in plugins/worktrunk/.codex-plugin/plugin.json use commands shaped like:
bash $PLUGIN_ROOT/hooks/wt.sh config state marker set 🤖 || true
On Windows, bare bash can resolve to the WSL launcher rather than Git Bash. In a sandboxed Codex session, that launcher fails to start with:
Access is denied.
Error code: Bash/Service/CreateInstance/E_ACCESSDENIED
Git Bash works when addressed explicitly. Because the hooks are trusted and enabled, the failure repeats across prompt, permission, stop, and session lifecycle events.
Expected
The Codex plugin hooks should work on Windows without depending on which bash.exe wins PATH resolution. Optional marker failures should not produce repeated hook-failure banners.
Codex supports a Windows-only commandWindows override for command hooks: https://learn.chatgpt.com/docs/hooks
A Windows handler could use PowerShell/direct git-wt.exe, or explicitly launch Git Bash. It should avoid bare wt.exe, since that name resolves to Windows Terminal on Windows, and preserve the current best-effort/non-blocking marker behavior.
Relationship to existing issues
#3362 identified accidental Claude-hook discovery in Codex, and #3364 introduced the current Codex-native inline hooks. This is a follow-up specific to Windows command execution; neither issue covers commandWindows, WSL Bash resolution, or this failure mode.
Summary
The Codex-native activity hooks added via #3364 can fail repeatedly on Windows because the plugin manifest invokes bare
bashand provides nocommandWindowsoverride.Affected lifecycle events can surface:
Reproduction
The active inline hooks in
plugins/worktrunk/.codex-plugin/plugin.jsonuse commands shaped like:On Windows, bare
bashcan resolve to the WSL launcher rather than Git Bash. In a sandboxed Codex session, that launcher fails to start with:Git Bash works when addressed explicitly. Because the hooks are trusted and enabled, the failure repeats across prompt, permission, stop, and session lifecycle events.
Expected
The Codex plugin hooks should work on Windows without depending on which
bash.exewinsPATHresolution. Optional marker failures should not produce repeated hook-failure banners.Codex supports a Windows-only
commandWindowsoverride for command hooks: https://learn.chatgpt.com/docs/hooksA Windows handler could use PowerShell/direct
git-wt.exe, or explicitly launch Git Bash. It should avoid barewt.exe, since that name resolves to Windows Terminal on Windows, and preserve the current best-effort/non-blocking marker behavior.Relationship to existing issues
#3362 identified accidental Claude-hook discovery in Codex, and #3364 introduced the current Codex-native inline hooks. This is a follow-up specific to Windows command execution; neither issue covers
commandWindows, WSL Bash resolution, or this failure mode.