[FEATURE] make `claude agents` not launch agents with worktrees by default

Resolved 💬 4 comments Opened May 15, 2026 by taiyangc Closed May 16, 2026

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

When trying to use claude agents dashboard, all agents launched use awkward worktrees which

  1. Adds an extra step to merge back into actual working branch (ask it to commit/merge back)
  2. Sometimes adds 2-3 more unnecessary (or even empty) branches when working within an agent session
  3. When trying to delete (ctrl+x) a session the worktree does not get deleted automatically leaving a lot of branches/worktrees for manual cleanup

Proposed Solution

Add a .claude/settings.json option or dashboard ui option to disable worktree launch when starting a task inside claude agents

Alternative Solutions

This "workaround" is ok but still very awkward

SessionStart hook (auto) (Recommended)
     Wire a sweep script into ~/.claude/settings.json SessionStart so every new Claude Code session prunes stale worktree-* branches whose
     commits are already in HEAD/origin. Set-and-forget; works across all projects.

Priority

High - Significant impact on productivity

Feature Category

Configuration and settings

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗