Skip to content

Error when using [pre-start] - Unknown key pre-start will be ignored #1719

Closed

Description

@timjstacey

Summary

The documentation shows [pre-start] as an option yet the configuration is ignored
https://worktrunk.dev/hook/#pre-start

This it the output of wt config show

wt config show           
USER CONFIG @ ~/.config/worktrunk/config.toml
  [post-start]
  deps = "wt step copy-ignored"
  
↳ Optional system config not found @ '/Library/Application Support/worktrunk/config.toml'

PROJECT CONFIG @ ~/{PATH_TO_PROJECT}/.config/wt.toml
▲ Unknown key pre-start will be ignored
  [pre-start]
  install = "npm ci"

SHELL INTEGRATION
○ Shell integration active

○ bash: Already configured shell extension & completions @ ~/.bashrc:118
  if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init bash)"; fi
○ zsh: Already configured shell extension & completions @ ~/.zshrc:89
  if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init zsh)"; fi
○ fish: Skipped; ~/.config/fish/functions not found
○ nu: Skipped; ~/.config/nushell/vendor/autoload not found

CLAUDE CODE
↳ Plugin not installed. To install, run:
  claude plugin marketplace add max-sixty/worktrunk
  claude plugin install worktrunk@worktrunk
↳ Statusline not configured. See https://worktrunk.dev/claude-code/#statusline

OTHER
○ wt: 0.31.0
○ git: 2.53.0
○ Hyperlinks: active

Steps to reproduce:

  • add the following config to PROJECT CONFIG or USER CONFIG:
[pre-start]
install = "npm ci"
  • run wt switch --create feature/test-wt

Expected behaviour

  • pre-start runs npm ci

Actual behaviour:

  • pre-start is ignored
wt switch --create feature/test-wt
▲ Project config has unknown field pre-start (will be ignored)
✓ Created branch feature/test-wt from develop and worktree @ ~/Repositories/bitbucket/repeat-system-tests-wt.feature-test-wt
◎ Running post-start: user:deps

Activity

  1. max-sixty commented on Mar 25, 2026

    @max-sixty
    Owner

    yes, sorry, the docs are from main and the most recently released version doesn't have that yet.

    I'll release now; I was hoping to do another change on hooks, but no reason to wait

  2. timjstacey commented on Mar 25, 2026

    @timjstacey
    Author

    I was about to reply to say [post-create] is still working but you beat me to it.

    All good, merge when you're ready.

  3. worktrunk-bot commented on Mar 25, 2026

    @worktrunk-bot
    Collaborator

    Thanks for reporting this! I looked into this and pre-start is a new hook name that was introduced in #1679 (the hooks rationalization), which landed on main after the v0.31.0 release. The docs site at worktrunk.dev is built from main, so it shows pre-start as available even though the latest published release (v0.31.0) doesn't recognize it yet.

    On v0.31.0, the equivalent hook is called post-create:

    [post-create]
    install = "npm ci"

    This will run as a blocking step before post-start, which is the same behavior that pre-start provides in the next release. When the next version is released, both names will be accepted (with post-create showing a deprecation notice pointing to pre-start).

    A maintainer will confirm and can decide whether to expedite a release.

  4. max-sixty commented on Mar 25, 2026

    @max-sixty
    Owner

    release done! sorry for the out-of-sync-ness @timjstacey !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions