[FEATURE] Enhanced worktree management with selective checkout for parallel agent workflows
1. TITLE
Enhanced worktree management with selective checkout for parallel agent workflows
2. PREFLIGHT CHECKLIST
- [ ] I have searched existing requests and this feature hasn't been requested yet
- [ ] This is a single feature request (not multiple features)
3. PROBLEM STATEMENT
When running multiple Claude Code agents in parallel using git worktrees, I cannot selectively pull changes from an agent's worktree while it continues working. I must wait for the agent to finish completely, then review everything at once.
This creates friction in parallel development workflows:
- Agent A is implementing a large feature in
worktree-feature-a/ - I need one file (
auth/callback.ts) that Agent A already created for another task - I cannot safely cherry-pick that file while Agent A is mid-edit
- I must either wait (losing time) or risk conflicts (losing work)
The core issue: worktree isolation is all-or-nothing. There's no incremental visibility into agent progress or selective checkout of completed work.
4. PROPOSED SOLUTION
Add a worktree status panel and selective checkout capability to Claude Code Desktop:
Live Worktree Status Panel:
- Show all active worktrees in a sidebar or panel
- Display uncommitted changes, recent commits, and agent status per worktree
- Visual indicator when agent is actively editing vs. idle
Selective Checkout:
- Right-click a file in worktree panel → "Checkout to main"
- Or CLI:
claude worktree checkout <worktree> <file> - Copies completed file to main working directory without affecting agent
Preview Changes:
- View diffs from any worktree without switching to it
- Compare worktree state vs. main branch
- See which files are "stable" (committed) vs. "in-progress" (uncommitted)
Merge Workflow:
- When agent finishes, one-click "Merge to main" with auto-squash option
- Auto-cleanup: remove worktree after successful merge
- Conflict detection before merge attempt
5. ALTERNATIVE SOLUTIONS
Current workarounds:
- Manually
git cherry-pickfrom worktree - risky if agent is mid-edit, requires knowing commit hashes - Wait for agent to finish - defeats the purpose of parallel work
- Run
git diffin worktree terminal - no integration with Desktop UI, manual process
What Codex does:
OpenAI's Codex app handles this elegantly: "As an agent works, you can check out changes locally or let it continue making progress without touching your local git state." This is the UX I'm looking for.
6. PRIORITY
- [ ] Critical - Blocking my work
- [x] High - Significant impact on productivity
- [ ] Medium - Would be very helpful
- [ ] Low - Nice to have
7. FEATURE CATEGORY
- [ ] CLI commands and flags
- [x] Interactive mode (TUI)
- [ ] File operations
- [ ] API and model interactions
- [ ] MCP server integration
- [ ] Performance and speed
- [ ] Configuration and settings
- [ ] Developer tools/SDK
- [ ] Documentation
- [ ] Other
8. USE CASE EXAMPLE
Scenario: Building a full-stack feature with parallel agents
- I start two Claude Code sessions via Desktop's "+ New session":
- Agent A (worktree
feature-auth/): "Implement OAuth login with Google" - Agent B (worktree
feature-dashboard/): "Build user dashboard with profile page"
- Agent A finishes the OAuth callback handler (
auth/callback.ts) in 5 minutes
- Meanwhile, Agent B needs that callback handler to test the dashboard's login flow
- With this feature:
- I see in the worktree panel that
auth/callback.tsis committed infeature-auth/ - I right-click → "Checkout to main"
- Agent B can now reference it while Agent A continues implementing the rest of OAuth
- Without this feature:
- I wait 20 minutes for Agent A to finish entirely
- Or I interrupt Agent A, losing context
- Or I manually cherry-pick and hope Agent A doesn't touch that file again
This would save 15+ minutes per parallel workflow and eliminate the risk of conflicts.
9. ADDITIONAL CONTEXT
Reference implementation:
- OpenAI Codex app announcement (Feb 2026): "Each agent works on an isolated copy of your code, allowing you to explore different paths without needing to track how they impact your codebase. As an agent works, you can check out changes locally or let it continue making progress without touching your local git state."
Technical considerations:
- Claude Code Desktop already creates worktrees in
~/.claude-worktrees/automatically - Git supports safe file checkout from worktrees via
git show worktree:path > file - Could integrate with existing
/resumesession picker that shows worktree sessions
Related features that would complement this:
- Worktree-aware session grouping in sidebar
- Visual diff viewer for cross-worktree comparison
- Notification when specific files are "ready" in a worktree
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗