[BUG] `post-checkout` git hook does not fire when Claude creates a worktree
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When Claude Desktop creates a worktree, the git post-checkout hook does not fire. The same hook fires correctly when a worktree is created via claude --worktree in the CLI.
This is distinct from existing issues calling out that WorktreeCreate / Remove are not firing as it's referring to native worktree hooks supported by the CLI.
What Should Happen?
Git post-checkout should fire after Desktop creates a worktree, consistent with CLI behavior and with what native git worktree add and claude --worktree does.
Error Messages/Logs
(no error — the hook is silently skipped; the worktree is created without a post-checkout invocation)
Steps to Reproduce
- In a project with a
post-checkouthook configured (e.g., viacore.hooksPath = .githooks), executing something liketouch post-checkout-executedso invocations are observable via the presence of the file at the root of the worktree. - Confirm the hook fires via CLI: run
claude --worktree <name>and observe the file exists. - Open the same project in Claude Desktop and create a new worktree session.
- Observe that no file was written and
post-checkoutwas never called.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.126 (Claude Code) and Claude 1.6608.2 (ebf1a1) 2026-05-08T23:17:27.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
I ran into this while building noheltcj/loadout, a tool that manages composable agent guidance. A post-checkout hook (via core.hooksPath) is required whenever a branch switch or worktree creation occurs so the tool can sync. Because Desktop-created worktrees never trigger native hooks, the agent starts without a CLAUDE.md file in memory.
noheltcj/loadout#33 was planned, but given the existing issues related to WorktreeCreate not firing, this likely won't suffice as a workaround.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗