[FEATURE] Show WorktreeCreate hook output during claude --worktree
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
When using a WorktreeCreate hook that runs a long bootstrap script (e.g. tuist generate, dependency resolution), claude --worktree shows no output while the hook runs. The user stares at a silent console for several minutes with no indication of progress.
Current behavior
- WorktreeCreate hook stderr/stdout is suppressed by default
- Output is only visible with --verbose or --debug, both of which are noisy and show unrelated internal details
- The workaround is to tail -f the log file in a second terminal, but that requires knowing the log path ahead of time
Context
Our WorktreeCreate hook creates a git worktree, then runs a bootstrap script that resolves dependencies and generates the Xcode project. This takes 2-5 minutes. The hook already writes structured progress logs to stderr, but Claude Code discards them.
Proposed Solution
Proposed behavior
Stream WorktreeCreate hook stderr to the user's terminal in real time during worktree creation. This hook type is fundamentally different from pre/post tool-call hooks:
- It replaces a built-in flow (git worktree add), so the user expects to see what's happening
- It's expected to be long-running (bootstrap scripts, dependency installs, code generation)
- It runs before the session starts, so there's no transcript to toggle verbose mode in
Possible approaches
- Always stream stderr for WorktreeCreate hooks — since they replace a built-in flow and run before the session, suppressing output has no UX benefit
- Add a --show-hook-output flag — opt-in without the noise of --debug/--verbose
- Show a spinner with last line of stderr — minimal UI that still conveys progress (similar to how package managers show the current step)
Option 1 seems like the simplest and most correct — the user invoked claude --worktree expecting something to happen, and silence is the worst feedback.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗