Codex App "Commit or push" bypasses repository pre-commit hooks

Open 💬 1 comment Opened Jul 6, 2026 by lraveri

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

26.623.101652

What subscription do you have?

Not specified

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

When I use Codex App's desktop UI action "Commit or push", repository-local Git hooks in .git/hooks are not executed.

In my case, a pre-commit hook is configured to run lint-staged and tsc --noEmit. The hook runs correctly when I commit from a terminal with git commit, but it does not run when the commit is created from the Codex App UI.

This makes the desktop commit flow unsafe for repositories that rely on standard Git hook enforcement.

I also inspected the open-source repo and found that shared internal Git helpers explicitly disable hooks by forcing core.hooksPath=/dev/null in:

  • codex-rs/git-utils/src/operations.rs
  • codex-rs/git-utils/src/info.rs

I have not confirmed whether the exact desktop Commit or push action uses those same helpers, but the observed behavior is consistent with hooks being bypassed.

What steps can reproduce the bug?

  1. In any Git repository, configure hooks normally:
  • git config --local core.hooksPath .git/hooks
  1. Create .git/hooks/pre-commit with something visible, for example:
#!/usr/bin/env sh
set -e
echo "pre-commit ran"
exit 1
  1. Make the hook executable:
chmod +x .git/hooks/pre-commit
  1. Modify a tracked file.
  2. Verify that a terminal commit is blocked as expected:
git add <file>
git commit -m "test terminal commit"
  1. Now use the Codex App desktop UI action "Commit or push" for the same repository.
  2. Observe that the commit is created even though the local pre-commit hook should have blocked it.

In my local repro, I also used a formatting change to confirm this:

  • the unformatted code remained unformatted inside the commit created by Codex App
  • running the formatter manually afterwards fixed the working tree
  • this strongly suggests the pre-commit hook was never executed during the app-created commit

What is the expected behavior?

One of these should be true, but currently I cannot tell which behavior is intended:

  1. Codex App should honor repository-local Git hooks when using "Commit or push".
  2. If bypassing hooks is intentional, this should be clearly documented and there should ideally be a supported option to enable hook execution.

Additional information

Relevant code references from the open-source repo:

  • codex-rs/git-utils/src/operations.rs disables hooks via core.hooksPath=/dev/null
  • codex-rs/git-utils/src/info.rs does the same for async Git helper commands
  • codex-rs/git-utils/src/baseline.rs contains a test explicitly asserting that configured hook paths are ignored for an internal index-writing path

Question:

Is there a supported way to make Codex App's "Commit or push" flow respect standard repository Git hooks such as .git/hooks/pre-commit?

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗