What
The WorktreeCreate hook event now supports hook-specific output providing the absolute path to the created worktree directory.
Details
- JavaScript hooks return
{ hookEventName: "WorktreeCreate", worktreePath: "<path>" } - Command hooks print the path on stdout instead
- Enables custom worktree workflows via hooks
Evidence
WorktreeCreate hook output (search for "Hook-specific output for the WorktreeCreate event")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agree
Added WorktreeCreate hook support for type: "http" — return the created worktree path via hookSpecificOutput.worktreePath in the response…