[FEATURE] Task chips (spawn_task): name the worktree and branch from the task, and let the spawner set the worktree destination

Status Open
Reported on v2.1.286
Maintainer reply None cached
Activity 0 comments · opened Oct 5, 2026

When a session suggests a task with spawn_task and I click Start with worktree, the app creates the worktree and branch with a random generated name, e.g. D:/worktrees/agents/youthful-sinoussi-974505 on branch claude/youthful-sinoussi-974505. The task is fully known at that moment: the spawning session already wrote its title, its summary and the prompt. Even so, nothing about the task reaches the name, and the spawner has no say in where the worktree goes.

spawn_task takes only title, prompt, tldr and cwd. cwd picks the project; the tool description says the session "gets a fresh worktree under this path", so it is not the destination either.

The result is a list of git worktree list entries and branches that say nothing about the work. To tell them apart I have to open each session. Renaming afterwards is not a fix: git branch -m works while the session runs, but git worktree move pulls the folder out from under the live session.

Request — two additions to spawn_task:

  1. Name from the task. Derive the worktree folder and branch name from the task, either from a new optional name parameter set by the spawning session, or from a slug of title when it is omitted. Keep a short random suffix if uniqueness needs it (e.g. claude/fix-resume-path-case-3f2a).
  2. Destination. An optional parameter for the final worktree path (or its parent folder), so the spawner can place it where the project keeps its worktrees, such as a sibling directory, instead of the app's default location.

Both are optional, so existing chips behave as today.

Env: Windows 11, Claude desktop app 2.19675.0 (Code tab), Claude Code 2.1.286.

Related, none covering spawn_task:

  • #27282 (open): configurable worktree location in general; a comment there found that a WorktreeCreate hook cannot reliably relocate chip worktrees, since the app sometimes reuses a parked worktree and skips the hook.
  • #25902, #69909 (closed not planned, locked): task-derived branch names in general.
  • #54653 (closed not planned, locked): renaming a worktree branch mid-session.
  • #93308 (open): a worktree.branchPrefix setting.

View original on GitHub ↗