Codex Desktop worktree creation does not run repository post-checkout hooks
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, rust
- Domain
- desktop-dev, devtools
Research direction
Start by tracing Codex Desktop's worktree-creation path and the internal Git commands shown in the logs, checking whether -c core.hooksPath=/dev/null is applied there. Reproduce with a repository post-checkout hook and compare the app's behavior with git worktree add. Done means hooks run during app-managed creation or the supported opt-in setup behavior is documented and tested.
Written by the indexing model from the issue text.
Description
Describe the bug
When Codex Desktop creates a Git worktree, the worktree is created successfully, but the repository's Git post-checkout hook is not run. The hook's output is absent and the setup commands it normally runs are not executed.
Steps to reproduce
- Configure a repository Git
post-checkouthook that prints a marker and performs setup. - Verify that the hook runs when creating a worktree from a normal terminal with
git worktree add. - In Codex Desktop, create a new worktree for the same repository.
- Observe output similar to:
[info] Starting worktree creation
Preparing worktree (detached HEAD cb882b3)
HEAD is now at cb882b3 docs: add main page UI/UX (#98)
Worktree created at /Users/.../.codex/worktrees/3268/firehorse
No local environment selected
- The
post-checkouthook's marker/output is absent, and the hook-based setup does not run.
Expected behavior
Codex Desktop should either:
- run the repository's
post-checkouthook as normal Gitworktree adddoes; or - explicitly document that app-managed worktree creation skips Git hooks and provide a supported opt-in worktree setup step.
Additional context
- Platform: macOS
- Git: 2.50.1 (Apple Git-155)
- The same repository hook runs when
git worktree addis executed from a normal terminal. - Git normally invokes
post-checkoutaftergit worktree add, unless checkout is disabled. - A Codex Desktop log shows internal Git commands invoked with
-c core.hooksPath=/dev/null, which disables configured Git hooks. Please confirm whether the same setting is applied to the worktree-creation path. - Related, but not duplicates: #27133 discusses project-level Codex hooks being ignored inside a Git worktree; #23446 documents Codex Git helpers using
core.hooksPath=/dev/null.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·