Tracking: rename creation hooks pre-start/post-start → pre-create/post-create
Summary
Rename the worktree-creation hooks from pre-start/post-start to pre-create/post-create. post-start keeps confusing users ("start of what?", #1571). Hook names are protected interfaces (the wt.toml format and the wt hook CLI), so this ships as a staged deprecation rather than the breaking change already on the hooks/rename-start-to-create branch.
End state: -create canonical everywhere, -start accepted through a silent migration and then a warned one.
The semantic flip (main risk)
pre-create is a new name with no history. post-create is being reclaimed, and its meaning inverts: the old post-create was blocking (the pre-0.32.0 name for pre-start), the new one is background (an alias of post-start). A config still holding a stale post-create would flip from blocking to background silently. This is contained: post-create has been a fatal load error since 0.44.0, so by Phase 1 it will have been a hard error for roughly ten releases. The Phase 1 changelog states the flip plainly.
Plan
Releases land roughly weekly, so phases are paced in months.
- Phase 1 (~June 2026): both names work, no warnings.
-createbecomes the canonical serde field;migrate_content()rewrites-startsilently; docs andwt config updatemove to-create. The dead pre-0.32.0post-createmachinery is removed first. - Phase 2 (~September 2026): add deprecation warnings on config load and on
wt hook pre-start/post-start, both pointing atwt config update. - Phase 3 (deferred): decide whether
-startkeeps migrating indefinitely, becomes a fatal error, or is removed.
Open decisions
- Bundle the
post-createfatal-error removal into Phase 1 (default), or hold it one release longer. - Cross-link #1571 now, and close it once its docs point lands in Phase 1.
- Phase 3 disposition.
History, current state, and Phase 1 implementation detail
History
This is the third naming move, and it partly reverses the second.
| When | Release | Change |
|---|---|---|
| Before 0.32.0 | Two creation hooks: post-create (blocking) and post-start (background). |
|
| 0.32.0 | #1679 | Hooks reorganized into symmetric pre-/post- pairs. post-create renamed to pre-start, kept as a silently-migrated alias. |
| 0.34.0 | #1776 | post-create removed from the docs. |
| 2026-03-17 | #1571 | Issue filed: hook execution order is confusing and post-start is an unclear name. |
| 0.44.0 | #2361 | post-create config key becomes a fatal load error. Clears the silent migration so the name can be reclaimed. |
| 0.45.1 | #2436 | wt hook post-create CLI alias starts printing a deprecation warning. |
| 0.52.0 (now) | The actual rename never shipped. This issue resumes it. |
Current state
- Canonical:
pre-start/post-start, across config keys,HookType, andwt hooksubcommands. post-createconfig key: fatal load error (POST_CREATE_REMOVED_MSG).post-createCLI:wt hook post-createresolves topre-startwith a warning.- Dead machinery from the unfinished 0.32.0 cycle:
HooksConfig::post_createand its folds,Deprecations::post_create,find_post_create_from_doc. pre-create: never existed.
Phase 1 implementation
Prerequisite, same PR: remove the dead post-create machinery so the name is free.
Config:
pre-create/post-createbecome the canonical serde fields; renameHookType::PreStart/PostStarttoPreCreate/PostCreate.migrate_content()rewrites-startto-create, covering top-level keys,[hooks.*],[projects."id"]flattened and[projects."id".hooks], and the string,[table], and[[array-of-tables]]value forms.wt config updateand the startup warning both run offdetect_deprecations(). Add the-startentry there soupdatefinds it, but leaveformat_deprecation_warnings()silent until Phase 2.
CLI:
parse_hook_typeandHOOK_TYPE_NAMESaccept-create;-startstays accepted with no warning.
Docs:
- Rewrite
src/cli/mod.rs(the primary source), regenerate thedocs/content/andskills/worktrunk/reference/mirrors, updateREADME.md, thedev/*.example.tomlfiles, and the JSON schema. Runcargo test --test integration test_docs_are_in_sync. - Per #1571, tighten the definition of when the hook fires.
- The
hooks/rename-start-to-createbranch already has correct mechanical edits to reuse.
Checklist
Phase 1:
- [ ] Remove dead
post-createmachinery - [ ]
migrate_content()rewrite covering all config shapes - [ ] Canonical serde fields and
HookTypevariants renamed - [ ]
parse_hook_type/HOOK_TYPE_NAMESaccept-create - [ ] Docs, examples, README, JSON schema updated
- [ ]
wt config updatemigrates-startwith no startup warning - [ ] Changelog entry naming the semantic flip
Phase 2:
- [ ]
-startwarning informat_deprecation_warnings() - [ ] CLI stderr warning for
wt hook pre-start/post-start
Phase 3:
- [ ] Decide keep, fatal, or remove
This was written by Claude Code on behalf of Maximilian Roos
Setting up post-create in the user config, yields this error on version 0.52.0.
It suggests to rename post-create to pre-start, which makes little sense to me after reading this issue and the docs:
https://worktrunk.dev/hook/#hook
I'll release first thing tomorrow!
actually — sorry — change of plan to make this problem less likely. I should have thought of this before
@worktrunk-bot:
- let's revert the docs change
- keep the code change — i.e. both Start and Create work
- then in a couple of weeks, when everyone has had a change to update, then we'll switch the docs
- then no one has the experience of @EcksDy , where the docs change before their version has changed
Opened #2857 — docs continue to recommend pre-start/post-start; both names work in code (wt hook pre-create, [pre-create] configs, table and array-of-tables forms — all silent aliases). The pre-0.32.0 post-create fatal-load-error stays gone so [post-create] is valid TOML.
Once you're ready to flip the docs in a couple of weeks, most of the change is in src/cli/mod.rs's after_long_help and the doc-sync test propagates to the mirrors.
Sorry this is a bit of mess.
On further reflection, pre-create & post-create are not good, because pre-create suggests "before creating the worktree", when we actually want "blocking, after creating worktree, before starting command"
I think start is not great, but can't think of ones that are that much better:
execute, but this runs even without--executeinit?ready??
very open to ideas and feedback...
Agreed pre-create is worse than pre-start — and I think it's worth naming why, because it rules out a whole family of candidates.
The trap: both hooks fire after the worktree exists. pre-start blocks before --execute/post-start; post-start runs in the background (lifecycle steps 4–5). So any verb that names the creation event makes pre- lie about timing. pre-create/pre-new/pre-init all read as "before the worktree is created," which is wrong. The pair isn't really symmetric around an event the way pre-merge/post-merge is — the only real difference between them is blocking vs. background.
Why start feels off: every other pair is anchored to a command the user types — wt merge, wt remove, wt switch, wt commit. There's no wt start. So it's the one pair with no verb behind it, hence "start of what?".
Two ways out:
-
Anchor on the state the worktree reaches, not the creation event —
ready:pre-ready— blocking work that makes it ready (deps, env files), before the command runspost-ready— background work kicked off once it's ready (dev server, watchers)
This is the only option where
pre-/post-is honest: the prep genuinely happens before "ready," the background work after.readyalso reads well in prose ("runs once the worktree is ready"). -
Keep
start, sharpen the docs. It's arguably the most correct verb already — the work/session "starts" after both hooks — it's just vague out of context. Zero migration churn (we're mid-deprecation as it is), and #1571's ask was partly a docs-clarity fix anyway.
init is the familiar runner-up (everyone reads it as one-time new-thing setup, and devcontainers' postCreate/postStart are nearby prior art), but pre-init is slightly awkward since the blocking hook is the init.
My lean: ready if we're renaming, because it's the only scheme that makes the pre-/post- prefix tell the truth. Otherwise hold on start and just tighten the docs.
Happy to draft either once you pick.