Skip to content

unable to trust hooks, error in CLI #22847

Open

Description

@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?

  1. Launch codex
  2. type /hooks
  3. select any hook, Press enter to view hooks
  4. Press t to trust
  5. 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

Image

~/.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
          }
        ]
      }
    ]
  }
}

Activity

  1. added
    bug
    on May 15, 2026
  2. added
    hooks
    on May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions