add PreToolUse, PostToolUse, UserPromptSubmit hooks to Codex CLI

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Shayan Rais
2026-04-04 18:34:48 +05:00
parent d0c1149087
commit 87d35a2051
+36
View File
@@ -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"
}
]
}
]
}
}