unable to trust hooks, error in CLI
Open 💬 0 comments Opened May 15, 2026 by Moulick
What version of Codex CLI is running?
codex-cli 0.130.0
What subscription do you have?
Enterprise
Which model were you using?
N/A
What platform is your computer?
Darwin 25.5.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm2
Codex doctor report
not available
What issue are you seeing?
■ Failed to trust hook: config/batchWrite failed while updating hook trust in TUI
PreToolUse hooks
1 hook needs review before it can run.
[!] Hook 1 · new
Event PreToolUse
Matcher *
Source User config - ~/.codex/hooks.json
Command gryph _hook codex PreToolUse
Timeout 30s
Trust New hook - review required
What steps can reproduce the bug?
- Launch codex
- type
/hooks - select any hook, Press enter to view hooks
- Press t to trust
- Error:
Failed to trust hook: config/batchWrite failed while updating hook trust in TUI
What is the expected behavior?
Hooks are trusted and exectue
Additional information
<img width="1800" height="441" alt="Image" src="https://github.com/user-attachments/assets/f335531c-769e-4570-8889-49bbab709b62" />
~/.codex/hooks.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "gryph _hook codex PostToolUse",
"timeout": 30
}
]
}
],
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "gryph _hook codex PreToolUse",
"timeout": 30
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "gryph _hook codex SessionStart",
"timeout": 30
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "gryph _hook codex Stop",
"timeout": 30
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "gryph _hook codex UserPromptSubmit",
"timeout": 30
}
]
}
]
}
}