Desktop app: let the user name the worktree and branch when starting a session
Environment: Claude desktop app (Code tab), Windows 11.
Problem
Starting a session in a worktree gives two controls: a worktree tick box and the prompt. Nothing sets the worktree's name or its branch. The app makes up a name from the prompt's topic, such as feature-topic-5bfac1, and the branch gets the same name.
It also ignores a name the user writes into the prompt. A message that begins with ABC-123, or that says outright what the worktree should be called, still gets a generated topic name. Only sometimes does the key survive, as abc-456-68dab3.
Request
Add an optional name field next to the worktree tick box. It would set the worktree folder name and the branch name, and it would be passed as name to a WorktreeCreate hook when one is configured. Leaving it empty would keep the current generated name.
Why it matters
- Teams name branches after tickets. A generated name has to be renamed by hand afterwards.
- On Windows, renaming the worktree folder fails while the session has it open, so the fix has to wait until the session ends.
- Hooks can't work around it. The
WorktreeCreatepayload carries only the generatedname, andtranscript_pathis empty at that point, so a hook can't read the prompt to find the intended name. The hook log showsgenerated=feature-topic-5bfac1 ticket= transcript=.