Skip to content

Hooks no longer run after Codex Desktop update #21639

Description

@skydreamer21

What version of the Codex App are you using (From “About Codex” dialog)?

26.506.21252 (The affected sessions report cli_version: 0.129.0-alpha.15 in the rollout metadata.)

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.3.0 arm64 arm

What issue are you seeing?

After updating the Codex Desktop app, hooks configured in .codex/hooks.json no longer appear to run at all.

This is not limited to project-local hook discovery. Both of these hook types are failing:

SessionStart
PreToolUse
Before the update, my project had a SessionStart hook that printed instruction text. Codex Desktop injected that output as a developer message at the beginning of new sessions.

After the update, the same hook configuration no longer runs. The SessionStart hook output is absent from new sessions, and PreToolUse hooks also do not run before tool execution.

This appears to be a regression in Codex Desktop 0.129.0-alpha.15. The same setup worked in sessions using 0.128.0-alpha.1.

What steps can reproduce the bug?

  1. In a project, create .codex/config.toml:
[features]
codex_hooks = true
  1. Create .codex/hooks.json:
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup|resume|clear",
        "hooks": [
          {
            "type": "command",
            "command": "bash '/absolute/path/to/project/.codex/hooks/session_start_hook.sh'",
            "statusMessage": "Session start hook"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "bash '/absolute/path/to/project/.codex/hooks/pre_tool_use_hook.sh'"
          }
        ]
      }
    ]
  }
}
  1. Create .codex/hooks/session_start_hook.sh:
#!/bin/bash
set -euo pipefail

cat <<'EOF'
This is a SessionStart hook instruction.
EOF
  1. Create .codex/hooks/pre_tool_use_hook.sh:
#!/bin/bash
set -euo pipefail

echo "PreToolUse hook executed" >&2
exit 0
  1. Start a new Codex Desktop session in that project and check the session behavior.

What is the expected behavior?

The SessionStart hook should run, and its stdout should be injected into the session as a developer message, as it did before the update.

The PreToolUse hook should also run before matching tool execution.

Additional information

  • Working version: Codex Desktop sessions with cli_version: 0.128.0-alpha.1
  • Broken version: Codex Desktop sessions with cli_version: 0.129.0-alpha.15

I also tried copying the same hooks.json content from the project-local path to ~/.codex/hooks.json to check whether the issue was only project-local hook discovery. The observed issue is broader: hooks themselves still do not appear to run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workinghooksIssues related to event hooksregressionBehaviors that worked in previous versions but were broken due to an update

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions