From 87d35a2051aaea2f2faaa2754073ab26ac2c46d9 Mon Sep 17 00:00:00 2001 From: Shayan Rais Date: Sat, 4 Apr 2026 18:34:48 +0500 Subject: [PATCH] add PreToolUse, PostToolUse, UserPromptSubmit hooks to Codex CLI Co-Authored-By: Claude --- .codex/hooks.json | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.codex/hooks.json b/.codex/hooks.json index 054db9c..4e25deb 100644 --- a/.codex/hooks.json +++ b/.codex/hooks.json @@ -13,6 +13,30 @@ ] } ], + "PreToolUse": [ + { + "hooks": [ + { + "type": "command", + "command": "python3 .codex/hooks/scripts/hooks.py --hook PreToolUse", + "timeout": 10, + "statusMessage": "Running pre-tool-use hook" + } + ] + } + ], + "PostToolUse": [ + { + "hooks": [ + { + "type": "command", + "command": "python3 .codex/hooks/scripts/hooks.py --hook PostToolUse", + "timeout": 10, + "statusMessage": "Running post-tool-use hook" + } + ] + } + ], "Stop": [ { "hooks": [ @@ -24,6 +48,18 @@ } ] } + ], + "UserPromptSubmit": [ + { + "hooks": [ + { + "type": "command", + "command": "python3 .codex/hooks/scripts/hooks.py --hook UserPromptSubmit", + "timeout": 10, + "statusMessage": "Running user prompt submit hook" + } + ] + } ] } }